From dd628139a7ec75537342c289d571cacbbba58492 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 11:49:44 -0700 Subject: [PATCH] docs: add generated snippets (#130) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: https://github.com/googleapis/googleapis/commit/55b9e1e0b3106c850d13958352bc0751147b6b15 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../managed_notebook_service/async_client.py | 206 + .../managed_notebook_service/client.py | 215 + .../services/notebook_service/async_client.py | 730 ++++ .../services/notebook_service/client.py | 762 ++++ .../services/notebook_service/async_client.py | 442 ++ .../services/notebook_service/client.py | 461 +++ ...d_notebook_service_create_runtime_async.py | 50 + ...ed_notebook_service_create_runtime_sync.py | 50 + ...d_notebook_service_delete_runtime_async.py | 49 + ...ed_notebook_service_delete_runtime_sync.py | 49 + ...aged_notebook_service_get_runtime_async.py | 45 + ...naged_notebook_service_get_runtime_sync.py | 45 + ...ed_notebook_service_list_runtimes_async.py | 46 + ...ged_notebook_service_list_runtimes_sync.py | 46 + ...book_service_report_runtime_event_async.py | 50 + ...ebook_service_report_runtime_event_sync.py | 50 + ...ed_notebook_service_reset_runtime_async.py | 49 + ...ged_notebook_service_reset_runtime_sync.py | 49 + ...ed_notebook_service_start_runtime_async.py | 49 + ...ged_notebook_service_start_runtime_sync.py | 49 + ...ged_notebook_service_stop_runtime_async.py | 49 + ...aged_notebook_service_stop_runtime_sync.py | 49 + ...d_notebook_service_switch_runtime_async.py | 49 + ...ed_notebook_service_switch_runtime_sync.py | 49 + ...tebook_service_create_environment_async.py | 55 + ...otebook_service_create_environment_sync.py | 55 + ...notebook_service_create_execution_async.py | 50 + ..._notebook_service_create_execution_sync.py | 50 + ..._notebook_service_create_instance_async.py | 56 + ...1_notebook_service_create_instance_sync.py | 56 + ..._notebook_service_create_schedule_async.py | 50 + ...1_notebook_service_create_schedule_sync.py | 50 + ...tebook_service_delete_environment_async.py | 49 + ...otebook_service_delete_environment_sync.py | 49 + ...notebook_service_delete_execution_async.py | 49 + ..._notebook_service_delete_execution_sync.py | 49 + ..._notebook_service_delete_instance_async.py | 49 + ...1_notebook_service_delete_instance_sync.py | 49 + ..._notebook_service_delete_schedule_async.py | 49 + ...1_notebook_service_delete_schedule_sync.py | 49 + ..._notebook_service_get_environment_async.py | 45 + ...1_notebook_service_get_environment_sync.py | 45 + ...v1_notebook_service_get_execution_async.py | 45 + ..._v1_notebook_service_get_execution_sync.py | 45 + ..._v1_notebook_service_get_instance_async.py | 45 + ...ebook_service_get_instance_health_async.py | 45 + ...tebook_service_get_instance_health_sync.py | 45 + ...s_v1_notebook_service_get_instance_sync.py | 45 + ..._v1_notebook_service_get_schedule_async.py | 45 + ...s_v1_notebook_service_get_schedule_sync.py | 45 + ...k_service_is_instance_upgradeable_async.py | 45 + ...ok_service_is_instance_upgradeable_sync.py | 45 + ...otebook_service_list_environments_async.py | 46 + ...notebook_service_list_environments_sync.py | 46 + ..._notebook_service_list_executions_async.py | 46 + ...1_notebook_service_list_executions_sync.py | 46 + ...1_notebook_service_list_instances_async.py | 46 + ...v1_notebook_service_list_instances_sync.py | 46 + ...1_notebook_service_list_schedules_async.py | 46 + ...v1_notebook_service_list_schedules_sync.py | 46 + ...otebook_service_register_instance_async.py | 50 + ...notebook_service_register_instance_sync.py | 50 + ...book_service_report_instance_info_async.py | 50 + ...ebook_service_report_instance_info_sync.py | 50 + ...1_notebook_service_reset_instance_async.py | 49 + ...v1_notebook_service_reset_instance_sync.py | 49 + ...otebook_service_rollback_instance_async.py | 50 + ...notebook_service_rollback_instance_sync.py | 50 + ..._service_set_instance_accelerator_async.py | 51 + ...k_service_set_instance_accelerator_sync.py | 51 + ...ebook_service_set_instance_labels_async.py | 49 + ...tebook_service_set_instance_labels_sync.py | 49 + ...service_set_instance_machine_type_async.py | 50 + ..._service_set_instance_machine_type_sync.py | 50 + ...1_notebook_service_start_instance_async.py | 49 + ...v1_notebook_service_start_instance_sync.py | 49 + ...v1_notebook_service_stop_instance_async.py | 49 + ..._v1_notebook_service_stop_instance_sync.py | 49 + ...notebook_service_trigger_schedule_async.py | 49 + ..._notebook_service_trigger_schedule_sync.py | 49 + ...ok_service_update_instance_config_async.py | 49 + ...ook_service_update_instance_config_sync.py | 49 + ...e_update_shielded_instance_config_async.py | 49 + ...ce_update_shielded_instance_config_sync.py | 49 + ...notebook_service_upgrade_instance_async.py | 49 + ...service_upgrade_instance_internal_async.py | 50 + ..._service_upgrade_instance_internal_sync.py | 50 + ..._notebook_service_upgrade_instance_sync.py | 49 + ...tebook_service_create_environment_async.py | 55 + ...otebook_service_create_environment_sync.py | 55 + ..._notebook_service_create_instance_async.py | 56 + ...1_notebook_service_create_instance_sync.py | 56 + ...tebook_service_delete_environment_async.py | 49 + ...otebook_service_delete_environment_sync.py | 49 + ..._notebook_service_delete_instance_async.py | 49 + ...1_notebook_service_delete_instance_sync.py | 49 + ..._notebook_service_get_environment_async.py | 45 + ...1_notebook_service_get_environment_sync.py | 45 + ...ta1_notebook_service_get_instance_async.py | 45 + ...eta1_notebook_service_get_instance_sync.py | 45 + ...k_service_is_instance_upgradeable_async.py | 45 + ...ok_service_is_instance_upgradeable_sync.py | 45 + ...otebook_service_list_environments_async.py | 46 + ...notebook_service_list_environments_sync.py | 46 + ...1_notebook_service_list_instances_async.py | 46 + ...a1_notebook_service_list_instances_sync.py | 46 + ...otebook_service_register_instance_async.py | 50 + ...notebook_service_register_instance_sync.py | 50 + ...book_service_report_instance_info_async.py | 50 + ...ebook_service_report_instance_info_sync.py | 50 + ...1_notebook_service_reset_instance_async.py | 49 + ...a1_notebook_service_reset_instance_sync.py | 49 + ..._service_set_instance_accelerator_async.py | 51 + ...k_service_set_instance_accelerator_sync.py | 51 + ...ebook_service_set_instance_labels_async.py | 49 + ...tebook_service_set_instance_labels_sync.py | 49 + ...service_set_instance_machine_type_async.py | 50 + ..._service_set_instance_machine_type_sync.py | 50 + ...1_notebook_service_start_instance_async.py | 49 + ...a1_notebook_service_start_instance_sync.py | 49 + ...a1_notebook_service_stop_instance_async.py | 49 + ...ta1_notebook_service_stop_instance_sync.py | 49 + ...notebook_service_upgrade_instance_async.py | 49 + ...service_upgrade_instance_internal_async.py | 50 + ..._service_upgrade_instance_internal_sync.py | 50 + ..._notebook_service_upgrade_instance_sync.py | 49 + .../snippet_metadata_notebooks_v1.json | 3653 +++++++++++++++++ .../snippet_metadata_notebooks_v1beta1.json | 1695 ++++++++ 128 files changed, 14008 insertions(+) create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_async.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_sync.py create mode 100644 samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_sync.py create mode 100644 samples/generated_samples/snippet_metadata_notebooks_v1.json create mode 100644 samples/generated_samples/snippet_metadata_notebooks_v1beta1.json diff --git a/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py b/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py index 2b9ee8d..3811791 100644 --- a/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py +++ b/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py @@ -223,6 +223,26 @@ async def list_runtimes( ) -> pagers.ListRuntimesAsyncPager: r"""Lists Runtimes in a given project and location. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_runtimes(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_runtimes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListRuntimesRequest, dict]): The request object. Request for listing Managed Notebook @@ -304,6 +324,26 @@ async def get_runtime( r"""Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetRuntimeRequest( + name="name_value", + ) + + # Make the request + response = client.get_runtime(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetRuntimeRequest, dict]): The request object. Request for getting a Managed @@ -378,6 +418,31 @@ async def create_runtime( r"""Creates a new Runtime in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateRuntimeRequest( + parent="parent_value", + runtime_id="runtime_id_value", + ) + + # Make the request + operation = client.create_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateRuntimeRequest, dict]): The request object. Request for creating a Managed @@ -476,6 +541,29 @@ async def delete_runtime( ) -> operation_async.AsyncOperation: r"""Deletes a single Runtime. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteRuntimeRequest, dict]): The request object. Request for deleting a Managed @@ -572,6 +660,30 @@ async def start_runtime( https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_start_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.start_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StartRuntimeRequest, dict]): The request object. Request for starting a Managed @@ -658,6 +770,30 @@ async def stop_runtime( https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_stop_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StopRuntimeRequest, dict]): The request object. Request for stopping a Managed @@ -740,6 +876,29 @@ async def switch_runtime( ) -> operation_async.AsyncOperation: r"""Switch a Managed Notebook Runtime. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_switch_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SwitchRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.switch_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SwitchRuntimeRequest, dict]): The request object. Request for switching a Managed @@ -822,6 +981,29 @@ async def reset_runtime( ) -> operation_async.AsyncOperation: r"""Resets a Managed Notebook Runtime. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_reset_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ResetRuntimeRequest, dict]): The request object. Request for reseting a Managed @@ -904,6 +1086,30 @@ async def report_runtime_event( ) -> operation_async.AsyncOperation: r"""Report and process a runtime event. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_report_runtime_event(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportRuntimeEventRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_runtime_event(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ReportRuntimeEventRequest, dict]): The request object. Request for reporting a Managed diff --git a/google/cloud/notebooks_v1/services/managed_notebook_service/client.py b/google/cloud/notebooks_v1/services/managed_notebook_service/client.py index 71ab891..f274e65 100644 --- a/google/cloud/notebooks_v1/services/managed_notebook_service/client.py +++ b/google/cloud/notebooks_v1/services/managed_notebook_service/client.py @@ -419,6 +419,27 @@ def list_runtimes( ) -> pagers.ListRuntimesPager: r"""Lists Runtimes in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_runtimes(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_runtimes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListRuntimesRequest, dict]): The request object. Request for listing Managed Notebook @@ -500,6 +521,27 @@ def get_runtime( r"""Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetRuntimeRequest( + name="name_value", + ) + + # Make the request + response = client.get_runtime(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetRuntimeRequest, dict]): The request object. Request for getting a Managed @@ -574,6 +616,32 @@ def create_runtime( r"""Creates a new Runtime in a given project and location. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateRuntimeRequest( + parent="parent_value", + runtime_id="runtime_id_value", + ) + + # Make the request + operation = client.create_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateRuntimeRequest, dict]): The request object. Request for creating a Managed @@ -672,6 +740,30 @@ def delete_runtime( ) -> operation.Operation: r"""Deletes a single Runtime. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteRuntimeRequest, dict]): The request object. Request for deleting a Managed @@ -768,6 +860,31 @@ def start_runtime( https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_start_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.start_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StartRuntimeRequest, dict]): The request object. Request for starting a Managed @@ -854,6 +971,31 @@ def stop_runtime( https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_stop_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StopRuntimeRequest, dict]): The request object. Request for stopping a Managed @@ -936,6 +1078,30 @@ def switch_runtime( ) -> operation.Operation: r"""Switch a Managed Notebook Runtime. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_switch_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SwitchRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.switch_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SwitchRuntimeRequest, dict]): The request object. Request for switching a Managed @@ -1018,6 +1184,30 @@ def reset_runtime( ) -> operation.Operation: r"""Resets a Managed Notebook Runtime. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_reset_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ResetRuntimeRequest, dict]): The request object. Request for reseting a Managed @@ -1100,6 +1290,31 @@ def report_runtime_event( ) -> operation.Operation: r"""Report and process a runtime event. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_report_runtime_event(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportRuntimeEventRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_runtime_event(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ReportRuntimeEventRequest, dict]): The request object. Request for reporting a Managed diff --git a/google/cloud/notebooks_v1/services/notebook_service/async_client.py b/google/cloud/notebooks_v1/services/notebook_service/async_client.py index c105283..67f81ed 100644 --- a/google/cloud/notebooks_v1/services/notebook_service/async_client.py +++ b/google/cloud/notebooks_v1/services/notebook_service/async_client.py @@ -231,6 +231,26 @@ async def list_instances( ) -> pagers.ListInstancesAsyncPager: r"""Lists instances in a given project and location. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_instances(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListInstancesRequest, dict]): The request object. Request for listing notebook @@ -311,6 +331,25 @@ async def get_instance( ) -> instance.Instance: r"""Gets details of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetInstanceRequest, dict]): The request object. Request for getting a notebook @@ -385,6 +424,37 @@ async def create_instance( r"""Creates a new Instance in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateInstanceRequest, dict]): The request object. Request for creating a notebook @@ -487,6 +557,31 @@ async def register_instance( call makes these instances manageable by the Notebooks API. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_register_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.RegisterInstanceRequest, dict]): The request object. Request for registering a notebook @@ -547,6 +642,31 @@ async def set_instance_accelerator( ) -> operation_async.AsyncOperation: r"""Updates the guest accelerators of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest, dict]): The request object. Request for setting instance @@ -607,6 +727,30 @@ async def set_instance_machine_type( ) -> operation_async.AsyncOperation: r"""Updates the machine type of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest, dict]): The request object. Request for setting instance machine @@ -667,6 +811,29 @@ async def update_instance_config( ) -> operation_async.AsyncOperation: r"""Update Notebook Instance configurations. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_update_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest, dict]): The request object. Request for updating instance @@ -728,6 +895,30 @@ async def update_shielded_instance_config( r"""Updates the Shielded instance configuration of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_update_shielded_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateShieldedInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_shielded_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest, dict]): The request object. Request for updating the Shielded @@ -789,6 +980,29 @@ async def set_instance_labels( ) -> operation_async.AsyncOperation: r"""Replaces all the labels of an Instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_labels(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceLabelsRequest, dict]): The request object. Request for setting instance labels. @@ -849,6 +1063,29 @@ async def delete_instance( ) -> operation_async.AsyncOperation: r"""Deletes a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteInstanceRequest, dict]): The request object. Request for deleting a notebook @@ -940,6 +1177,29 @@ async def start_instance( ) -> operation_async.AsyncOperation: r"""Starts a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_start_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StartInstanceRequest, dict]): The request object. Request for starting a notebook @@ -1000,6 +1260,29 @@ async def stop_instance( ) -> operation_async.AsyncOperation: r"""Stops a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_stop_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StopInstanceRequest, dict]): The request object. Request for stopping a notebook @@ -1060,6 +1343,29 @@ async def reset_instance( ) -> operation_async.AsyncOperation: r"""Resets a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_reset_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ResetInstanceRequest, dict]): The request object. Request for reseting a notebook @@ -1124,6 +1430,31 @@ async def report_instance_info( information to the instance metadata store. Do not use this method directly. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_report_instance_info(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ReportInstanceInfoRequest, dict]): The request object. Request for notebook instances to @@ -1184,6 +1515,25 @@ async def is_instance_upgradeable( ) -> service.IsInstanceUpgradeableResponse: r"""Check if a notebook instance is upgradable. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest, dict]): The request object. Request for checking if a notebook @@ -1236,6 +1586,25 @@ async def get_instance_health( ) -> service.GetInstanceHealthResponse: r"""Check if a notebook instance is healthy. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_instance_health(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceHealthRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance_health(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetInstanceHealthRequest, dict]): The request object. Request for checking if a notebook @@ -1306,6 +1675,29 @@ async def upgrade_instance( ) -> operation_async.AsyncOperation: r"""Upgrades a notebook instance to the latest version. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_upgrade_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceRequest, dict]): The request object. Request for upgrading a notebook @@ -1367,6 +1759,31 @@ async def rollback_instance( r"""Rollbacks a notebook instance to the previous version. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_rollback_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RollbackInstanceRequest( + name="name_value", + target_snapshot="target_snapshot_value", + ) + + # Make the request + operation = client.rollback_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.RollbackInstanceRequest, dict]): The request object. Request for rollbacking a notebook @@ -1429,6 +1846,31 @@ async def upgrade_instance_internal( call this endpoint to upgrade themselves. Do not use this method directly. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest, dict]): The request object. Request for upgrading a notebook @@ -1490,6 +1932,26 @@ async def list_environments( ) -> pagers.ListEnvironmentsAsyncPager: r"""Lists environments in a project. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_environments(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListEnvironmentsRequest, dict]): The request object. Request for listing environments. @@ -1568,6 +2030,25 @@ async def get_environment( ) -> environment.Environment: r"""Gets details of a single Environment. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetEnvironmentRequest, dict]): The request object. Request for getting a notebook @@ -1642,6 +2123,35 @@ async def create_environment( ) -> operation_async.AsyncOperation: r"""Creates a new Environment. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateEnvironmentRequest, dict]): The request object. Request for creating a notebook @@ -1744,6 +2254,29 @@ async def delete_environment( ) -> operation_async.AsyncOperation: r"""Deletes a single Environment. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteEnvironmentRequest, dict]): The request object. Request for deleting a notebook @@ -1836,6 +2369,26 @@ async def list_schedules( ) -> pagers.ListSchedulesAsyncPager: r"""Lists schedules in a given project and location. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_schedules(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListSchedulesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schedules(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListSchedulesRequest, dict]): The request object. Request for listing scheduled @@ -1916,6 +2469,25 @@ async def get_schedule( ) -> schedule.Schedule: r"""Gets details of schedule + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetScheduleRequest( + name="name_value", + ) + + # Make the request + response = client.get_schedule(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetScheduleRequest, dict]): The request object. Request for getting scheduled @@ -1985,6 +2557,29 @@ async def delete_schedule( ) -> operation_async.AsyncOperation: r"""Deletes schedule and all underlying jobs + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteScheduleRequest, dict]): The request object. Request for deleting an Schedule @@ -2079,6 +2674,31 @@ async def create_schedule( r"""Creates a new Scheduled Notebook in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateScheduleRequest( + parent="parent_value", + schedule_id="schedule_id_value", + ) + + # Make the request + operation = client.create_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateScheduleRequest, dict]): The request object. Request for created scheduled @@ -2176,6 +2796,29 @@ async def trigger_schedule( ) -> operation_async.AsyncOperation: r"""Triggers execution of an existing schedule. + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_trigger_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.TriggerScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.trigger_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.TriggerScheduleRequest, dict]): The request object. Request for created scheduled @@ -2237,6 +2880,26 @@ async def list_executions( ) -> pagers.ListExecutionsAsyncPager: r"""Lists executions in a given project and location + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_executions(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListExecutionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_executions(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListExecutionsRequest, dict]): The request object. Request for listing scheduled @@ -2317,6 +2980,25 @@ async def get_execution( ) -> execution.Execution: r"""Gets details of executions + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetExecutionRequest( + name="name_value", + ) + + # Make the request + response = client.get_execution(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetExecutionRequest, dict]): The request object. Request for getting scheduled @@ -2388,6 +3070,29 @@ async def delete_execution( ) -> operation_async.AsyncOperation: r"""Deletes execution + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteExecutionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteExecutionRequest, dict]): The request object. Request for deleting a scheduled @@ -2483,6 +3188,31 @@ async def create_execution( r"""Creates a new Scheduled Notebook in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateExecutionRequest( + parent="parent_value", + execution_id="execution_id_value", + ) + + # Make the request + operation = client.create_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateExecutionRequest, dict]): The request object. Request to create notebook execution diff --git a/google/cloud/notebooks_v1/services/notebook_service/client.py b/google/cloud/notebooks_v1/services/notebook_service/client.py index a68f59a..4bde3b7 100644 --- a/google/cloud/notebooks_v1/services/notebook_service/client.py +++ b/google/cloud/notebooks_v1/services/notebook_service/client.py @@ -466,6 +466,27 @@ def list_instances( ) -> pagers.ListInstancesPager: r"""Lists instances in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_instances(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListInstancesRequest, dict]): The request object. Request for listing notebook @@ -546,6 +567,26 @@ def get_instance( ) -> instance.Instance: r"""Gets details of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetInstanceRequest, dict]): The request object. Request for getting a notebook @@ -620,6 +661,38 @@ def create_instance( r"""Creates a new Instance in a given project and location. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateInstanceRequest, dict]): The request object. Request for creating a notebook @@ -722,6 +795,32 @@ def register_instance( call makes these instances manageable by the Notebooks API. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_register_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.RegisterInstanceRequest, dict]): The request object. Request for registering a notebook @@ -783,6 +882,32 @@ def set_instance_accelerator( ) -> operation.Operation: r"""Updates the guest accelerators of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest, dict]): The request object. Request for setting instance @@ -844,6 +969,31 @@ def set_instance_machine_type( ) -> operation.Operation: r"""Updates the machine type of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest, dict]): The request object. Request for setting instance machine @@ -907,6 +1057,30 @@ def update_instance_config( ) -> operation.Operation: r"""Update Notebook Instance configurations. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_update_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest, dict]): The request object. Request for updating instance @@ -969,6 +1143,31 @@ def update_shielded_instance_config( r"""Updates the Shielded instance configuration of a single Instance. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_update_shielded_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateShieldedInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_shielded_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest, dict]): The request object. Request for updating the Shielded @@ -1033,6 +1232,30 @@ def set_instance_labels( ) -> operation.Operation: r"""Replaces all the labels of an Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_set_instance_labels(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.SetInstanceLabelsRequest, dict]): The request object. Request for setting instance labels. @@ -1094,6 +1317,30 @@ def delete_instance( ) -> operation.Operation: r"""Deletes a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteInstanceRequest, dict]): The request object. Request for deleting a notebook @@ -1185,6 +1432,30 @@ def start_instance( ) -> operation.Operation: r"""Starts a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_start_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StartInstanceRequest, dict]): The request object. Request for starting a notebook @@ -1246,6 +1517,30 @@ def stop_instance( ) -> operation.Operation: r"""Stops a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_stop_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.StopInstanceRequest, dict]): The request object. Request for stopping a notebook @@ -1307,6 +1602,30 @@ def reset_instance( ) -> operation.Operation: r"""Resets a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_reset_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ResetInstanceRequest, dict]): The request object. Request for reseting a notebook @@ -1372,6 +1691,32 @@ def report_instance_info( information to the instance metadata store. Do not use this method directly. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_report_instance_info(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ReportInstanceInfoRequest, dict]): The request object. Request for notebook instances to @@ -1433,6 +1778,26 @@ def is_instance_upgradeable( ) -> service.IsInstanceUpgradeableResponse: r"""Check if a notebook instance is upgradable. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest, dict]): The request object. Request for checking if a notebook @@ -1486,6 +1851,26 @@ def get_instance_health( ) -> service.GetInstanceHealthResponse: r"""Check if a notebook instance is healthy. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_instance_health(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceHealthRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance_health(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetInstanceHealthRequest, dict]): The request object. Request for checking if a notebook @@ -1556,6 +1941,30 @@ def upgrade_instance( ) -> operation.Operation: r"""Upgrades a notebook instance to the latest version. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_upgrade_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceRequest, dict]): The request object. Request for upgrading a notebook @@ -1618,6 +2027,32 @@ def rollback_instance( r"""Rollbacks a notebook instance to the previous version. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_rollback_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RollbackInstanceRequest( + name="name_value", + target_snapshot="target_snapshot_value", + ) + + # Make the request + operation = client.rollback_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.RollbackInstanceRequest, dict]): The request object. Request for rollbacking a notebook @@ -1681,6 +2116,32 @@ def upgrade_instance_internal( call this endpoint to upgrade themselves. Do not use this method directly. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest, dict]): The request object. Request for upgrading a notebook @@ -1745,6 +2206,27 @@ def list_environments( ) -> pagers.ListEnvironmentsPager: r"""Lists environments in a project. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_environments(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListEnvironmentsRequest, dict]): The request object. Request for listing environments. @@ -1823,6 +2305,26 @@ def get_environment( ) -> environment.Environment: r"""Gets details of a single Environment. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetEnvironmentRequest, dict]): The request object. Request for getting a notebook @@ -1897,6 +2399,36 @@ def create_environment( ) -> operation.Operation: r"""Creates a new Environment. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateEnvironmentRequest, dict]): The request object. Request for creating a notebook @@ -1999,6 +2531,30 @@ def delete_environment( ) -> operation.Operation: r"""Deletes a single Environment. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteEnvironmentRequest, dict]): The request object. Request for deleting a notebook @@ -2091,6 +2647,27 @@ def list_schedules( ) -> pagers.ListSchedulesPager: r"""Lists schedules in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_schedules(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListSchedulesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schedules(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListSchedulesRequest, dict]): The request object. Request for listing scheduled @@ -2171,6 +2748,26 @@ def get_schedule( ) -> schedule.Schedule: r"""Gets details of schedule + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetScheduleRequest( + name="name_value", + ) + + # Make the request + response = client.get_schedule(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetScheduleRequest, dict]): The request object. Request for getting scheduled @@ -2240,6 +2837,30 @@ def delete_schedule( ) -> operation.Operation: r"""Deletes schedule and all underlying jobs + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteScheduleRequest, dict]): The request object. Request for deleting an Schedule @@ -2334,6 +2955,32 @@ def create_schedule( r"""Creates a new Scheduled Notebook in a given project and location. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateScheduleRequest( + parent="parent_value", + schedule_id="schedule_id_value", + ) + + # Make the request + operation = client.create_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateScheduleRequest, dict]): The request object. Request for created scheduled @@ -2431,6 +3078,30 @@ def trigger_schedule( ) -> operation.Operation: r"""Triggers execution of an existing schedule. + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_trigger_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.TriggerScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.trigger_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.TriggerScheduleRequest, dict]): The request object. Request for created scheduled @@ -2493,6 +3164,27 @@ def list_executions( ) -> pagers.ListExecutionsPager: r"""Lists executions in a given project and location + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_list_executions(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListExecutionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_executions(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.ListExecutionsRequest, dict]): The request object. Request for listing scheduled @@ -2573,6 +3265,26 @@ def get_execution( ) -> execution.Execution: r"""Gets details of executions + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_get_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetExecutionRequest( + name="name_value", + ) + + # Make the request + response = client.get_execution(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.GetExecutionRequest, dict]): The request object. Request for getting scheduled @@ -2644,6 +3356,30 @@ def delete_execution( ) -> operation.Operation: r"""Deletes execution + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_delete_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteExecutionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.DeleteExecutionRequest, dict]): The request object. Request for deleting a scheduled @@ -2739,6 +3475,32 @@ def create_execution( r"""Creates a new Scheduled Notebook in a given project and location. + + + .. code-block:: + + from google.cloud import notebooks_v1 + + def sample_create_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateExecutionRequest( + parent="parent_value", + execution_id="execution_id_value", + ) + + # Make the request + operation = client.create_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1.types.CreateExecutionRequest, dict]): The request object. Request to create notebook execution diff --git a/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py b/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py index 1755aca..710d520 100644 --- a/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py +++ b/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py @@ -220,6 +220,26 @@ async def list_instances( ) -> pagers.ListInstancesAsyncPager: r"""Lists instances in a given project and location. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_list_instances(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ListInstancesRequest, dict]): The request object. Request for listing notebook @@ -278,6 +298,25 @@ async def get_instance( ) -> instance.Instance: r"""Gets details of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_get_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.GetInstanceRequest, dict]): The request object. Request for getting a notebook @@ -328,6 +367,37 @@ async def create_instance( r"""Creates a new Instance in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_create_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1beta1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1beta1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.CreateInstanceRequest, dict]): The request object. Request for creating a notebook @@ -393,6 +463,31 @@ async def register_instance( call makes these instances manageable by the Notebooks API. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_register_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.RegisterInstanceRequest, dict]): The request object. Request for registering a notebook @@ -453,6 +548,31 @@ async def set_instance_accelerator( ) -> operation_async.AsyncOperation: r"""Updates the guest accelerators of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceAcceleratorRequest, dict]): The request object. Request for setting instance @@ -513,6 +633,30 @@ async def set_instance_machine_type( ) -> operation_async.AsyncOperation: r"""Updates the machine type of a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceMachineTypeRequest, dict]): The request object. Request for setting instance machine @@ -573,6 +717,29 @@ async def set_instance_labels( ) -> operation_async.AsyncOperation: r"""Updates the labels of an Instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_labels(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceLabelsRequest, dict]): The request object. Request for setting instance labels. @@ -632,6 +799,29 @@ async def delete_instance( ) -> operation_async.AsyncOperation: r"""Deletes a single Instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_delete_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.DeleteInstanceRequest, dict]): The request object. Request for deleting a notebook @@ -702,6 +892,29 @@ async def start_instance( ) -> operation_async.AsyncOperation: r"""Starts a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_start_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.StartInstanceRequest, dict]): The request object. Request for starting a notebook @@ -762,6 +975,29 @@ async def stop_instance( ) -> operation_async.AsyncOperation: r"""Stops a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_stop_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.StopInstanceRequest, dict]): The request object. Request for stopping a notebook @@ -822,6 +1058,29 @@ async def reset_instance( ) -> operation_async.AsyncOperation: r"""Resets a notebook instance. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_reset_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ResetInstanceRequest, dict]): The request object. Request for reseting a notebook @@ -886,6 +1145,31 @@ async def report_instance_info( information to the instance metadata store. Do not use this method directly. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_report_instance_info(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ReportInstanceInfoRequest, dict]): The request object. Request for notebook instances to @@ -946,6 +1230,25 @@ async def is_instance_upgradeable( ) -> service.IsInstanceUpgradeableResponse: r"""Check if a notebook instance is upgradable. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableRequest, dict]): The request object. Request for checking if a notebook @@ -997,6 +1300,29 @@ async def upgrade_instance( ) -> operation_async.AsyncOperation: r"""Upgrades a notebook instance to the latest version. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_upgrade_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.UpgradeInstanceRequest, dict]): The request object. Request for upgrading a notebook @@ -1059,6 +1385,31 @@ async def upgrade_instance_internal( call this endpoint to upgrade themselves. Do not use this method directly. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.UpgradeInstanceInternalRequest, dict]): The request object. Request for upgrading a notebook @@ -1119,6 +1470,26 @@ async def list_environments( ) -> pagers.ListEnvironmentsAsyncPager: r"""Lists environments in a project. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_list_environments(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ListEnvironmentsRequest, dict]): The request object. Request for listing environments. @@ -1175,6 +1546,25 @@ async def get_environment( ) -> environment.Environment: r"""Gets details of a single Environment. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_get_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.GetEnvironmentRequest, dict]): The request object. Request for getting a notebook @@ -1225,6 +1615,35 @@ async def create_environment( ) -> operation_async.AsyncOperation: r"""Creates a new Environment. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_create_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1beta1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1beta1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.CreateEnvironmentRequest, dict]): The request object. Request for creating a notebook @@ -1284,6 +1703,29 @@ async def delete_environment( ) -> operation_async.AsyncOperation: r"""Deletes a single Environment. + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_delete_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.DeleteEnvironmentRequest, dict]): The request object. Request for deleting a notebook diff --git a/google/cloud/notebooks_v1beta1/services/notebook_service/client.py b/google/cloud/notebooks_v1beta1/services/notebook_service/client.py index 53fda49..29e9668 100644 --- a/google/cloud/notebooks_v1beta1/services/notebook_service/client.py +++ b/google/cloud/notebooks_v1beta1/services/notebook_service/client.py @@ -427,6 +427,27 @@ def list_instances( ) -> pagers.ListInstancesPager: r"""Lists instances in a given project and location. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_list_instances(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ListInstancesRequest, dict]): The request object. Request for listing notebook @@ -486,6 +507,26 @@ def get_instance( ) -> instance.Instance: r"""Gets details of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_get_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.GetInstanceRequest, dict]): The request object. Request for getting a notebook @@ -537,6 +578,38 @@ def create_instance( r"""Creates a new Instance in a given project and location. + + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_create_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1beta1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1beta1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.CreateInstanceRequest, dict]): The request object. Request for creating a notebook @@ -603,6 +676,32 @@ def register_instance( call makes these instances manageable by the Notebooks API. + + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_register_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.RegisterInstanceRequest, dict]): The request object. Request for registering a notebook @@ -664,6 +763,32 @@ def set_instance_accelerator( ) -> operation.Operation: r"""Updates the guest accelerators of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceAcceleratorRequest, dict]): The request object. Request for setting instance @@ -725,6 +850,31 @@ def set_instance_machine_type( ) -> operation.Operation: r"""Updates the machine type of a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceMachineTypeRequest, dict]): The request object. Request for setting instance machine @@ -788,6 +938,30 @@ def set_instance_labels( ) -> operation.Operation: r"""Updates the labels of an Instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_set_instance_labels(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.SetInstanceLabelsRequest, dict]): The request object. Request for setting instance labels. @@ -848,6 +1022,30 @@ def delete_instance( ) -> operation.Operation: r"""Deletes a single Instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_delete_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.DeleteInstanceRequest, dict]): The request object. Request for deleting a notebook @@ -919,6 +1117,30 @@ def start_instance( ) -> operation.Operation: r"""Starts a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_start_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.StartInstanceRequest, dict]): The request object. Request for starting a notebook @@ -980,6 +1202,30 @@ def stop_instance( ) -> operation.Operation: r"""Stops a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_stop_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.StopInstanceRequest, dict]): The request object. Request for stopping a notebook @@ -1041,6 +1287,30 @@ def reset_instance( ) -> operation.Operation: r"""Resets a notebook instance. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_reset_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ResetInstanceRequest, dict]): The request object. Request for reseting a notebook @@ -1106,6 +1376,32 @@ def report_instance_info( information to the instance metadata store. Do not use this method directly. + + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_report_instance_info(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ReportInstanceInfoRequest, dict]): The request object. Request for notebook instances to @@ -1167,6 +1463,26 @@ def is_instance_upgradeable( ) -> service.IsInstanceUpgradeableResponse: r"""Check if a notebook instance is upgradable. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableRequest, dict]): The request object. Request for checking if a notebook @@ -1219,6 +1535,30 @@ def upgrade_instance( ) -> operation.Operation: r"""Upgrades a notebook instance to the latest version. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_upgrade_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.UpgradeInstanceRequest, dict]): The request object. Request for upgrading a notebook @@ -1282,6 +1622,32 @@ def upgrade_instance_internal( call this endpoint to upgrade themselves. Do not use this method directly. + + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.UpgradeInstanceInternalRequest, dict]): The request object. Request for upgrading a notebook @@ -1345,6 +1711,27 @@ def list_environments( ) -> pagers.ListEnvironmentsPager: r"""Lists environments in a project. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_list_environments(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.ListEnvironmentsRequest, dict]): The request object. Request for listing environments. @@ -1402,6 +1789,26 @@ def get_environment( ) -> environment.Environment: r"""Gets details of a single Environment. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_get_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.GetEnvironmentRequest, dict]): The request object. Request for getting a notebook @@ -1453,6 +1860,36 @@ def create_environment( ) -> operation.Operation: r"""Creates a new Environment. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_create_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1beta1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1beta1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.CreateEnvironmentRequest, dict]): The request object. Request for creating a notebook @@ -1513,6 +1950,30 @@ def delete_environment( ) -> operation.Operation: r"""Deletes a single Environment. + + .. code-block:: + + from google.cloud import notebooks_v1beta1 + + def sample_delete_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.notebooks_v1beta1.types.DeleteEnvironmentRequest, dict]): The request object. Request for deleting a notebook diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_async.py new file mode 100644 index 0000000..95e3194 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_async.py @@ -0,0 +1,50 @@ +# -*- 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 CreateRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_create_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateRuntimeRequest( + parent="parent_value", + runtime_id="runtime_id_value", + ) + + # Make the request + operation = client.create_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_sync.py new file mode 100644 index 0000000..1e6a2cf --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_sync.py @@ -0,0 +1,50 @@ +# -*- 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 CreateRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_create_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateRuntimeRequest( + parent="parent_value", + runtime_id="runtime_id_value", + ) + + # Make the request + operation = client.create_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_async.py new file mode 100644 index 0000000..81e6084 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_delete_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_sync.py new file mode 100644 index 0000000..621cf0e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_delete_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_async.py new file mode 100644 index 0000000..14ae589 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_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 GetRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_get_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetRuntimeRequest( + name="name_value", + ) + + # Make the request + response = await client.get_runtime(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_sync.py new file mode 100644 index 0000000..674bd89 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_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 GetRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_get_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetRuntimeRequest( + name="name_value", + ) + + # Make the request + response = client.get_runtime(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_async.py new file mode 100644 index 0000000..8ec2957 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_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 ListRuntimes +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_async] +from google.cloud import notebooks_v1 + + +async def sample_list_runtimes(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_runtimes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_sync.py new file mode 100644 index 0000000..c5947ed --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_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 ListRuntimes +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_sync] +from google.cloud import notebooks_v1 + + +def sample_list_runtimes(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_runtimes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_async.py new file mode 100644 index 0000000..a69dd22 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_async.py @@ -0,0 +1,50 @@ +# -*- 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 ReportRuntimeEvent +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_async] +from google.cloud import notebooks_v1 + + +async def sample_report_runtime_event(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportRuntimeEventRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_runtime_event(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_sync.py new file mode 100644 index 0000000..4203af5 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_sync.py @@ -0,0 +1,50 @@ +# -*- 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 ReportRuntimeEvent +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_sync] +from google.cloud import notebooks_v1 + + +def sample_report_runtime_event(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportRuntimeEventRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_runtime_event(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_async.py new file mode 100644 index 0000000..a686bd3 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_async.py @@ -0,0 +1,49 @@ +# -*- 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 ResetRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_reset_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_sync.py new file mode 100644 index 0000000..e47b31c --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_sync.py @@ -0,0 +1,49 @@ +# -*- 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 ResetRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_reset_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_async.py new file mode 100644 index 0000000..2e98f6e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_async.py @@ -0,0 +1,49 @@ +# -*- 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 StartRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_start_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.StartRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.start_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_sync.py new file mode 100644 index 0000000..ba89720 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StartRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_start_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.start_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_async.py new file mode 100644 index 0000000..74618e3 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_async.py @@ -0,0 +1,49 @@ +# -*- 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 StopRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_stop_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.StopRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_sync.py new file mode 100644 index 0000000..bb5b85b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StopRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_stop_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_async.py new file mode 100644 index 0000000..d0a5b2e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_async.py @@ -0,0 +1,49 @@ +# -*- 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 SwitchRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_async] +from google.cloud import notebooks_v1 + + +async def sample_switch_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.SwitchRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.switch_runtime(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_sync.py new file mode 100644 index 0000000..911307b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_sync.py @@ -0,0 +1,49 @@ +# -*- 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 SwitchRuntime +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_sync] +from google.cloud import notebooks_v1 + + +def sample_switch_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SwitchRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.switch_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_async.py new file mode 100644 index 0000000..7d2223f --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_async.py @@ -0,0 +1,55 @@ +# -*- 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 CreateEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_async] +from google.cloud import notebooks_v1 + + +async def sample_create_environment(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + environment = notebooks_v1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_sync.py new file mode 100644 index 0000000..401c8eb --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_environment_sync.py @@ -0,0 +1,55 @@ +# -*- 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 CreateEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_sync] +from google.cloud import notebooks_v1 + + +def sample_create_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_async.py new file mode 100644 index 0000000..91d8a15 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_async.py @@ -0,0 +1,50 @@ +# -*- 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 CreateExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateExecution_async] +from google.cloud import notebooks_v1 + + +async def sample_create_execution(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateExecutionRequest( + parent="parent_value", + execution_id="execution_id_value", + ) + + # Make the request + operation = client.create_execution(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateExecution_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_sync.py new file mode 100644 index 0000000..d7c3182 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_execution_sync.py @@ -0,0 +1,50 @@ +# -*- 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 CreateExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateExecution_sync] +from google.cloud import notebooks_v1 + + +def sample_create_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateExecutionRequest( + parent="parent_value", + execution_id="execution_id_value", + ) + + # Make the request + operation = client.create_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateExecution_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_async.py new file mode 100644 index 0000000..cfedee5 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_async.py @@ -0,0 +1,56 @@ +# -*- 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 CreateInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_create_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + instance = notebooks_v1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_sync.py new file mode 100644 index 0000000..47d5548 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_instance_sync.py @@ -0,0 +1,56 @@ +# -*- 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 CreateInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_create_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_async.py new file mode 100644 index 0000000..ac34f40 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_async.py @@ -0,0 +1,50 @@ +# -*- 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 CreateSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_async] +from google.cloud import notebooks_v1 + + +async def sample_create_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateScheduleRequest( + parent="parent_value", + schedule_id="schedule_id_value", + ) + + # Make the request + operation = client.create_schedule(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_sync.py new file mode 100644 index 0000000..f12655e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_create_schedule_sync.py @@ -0,0 +1,50 @@ +# -*- 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 CreateSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_sync] +from google.cloud import notebooks_v1 + + +def sample_create_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.CreateScheduleRequest( + parent="parent_value", + schedule_id="schedule_id_value", + ) + + # Make the request + operation = client.create_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_async.py new file mode 100644 index 0000000..31a90c2 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_async] +from google.cloud import notebooks_v1 + + +async def sample_delete_environment(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_sync.py new file mode 100644 index 0000000..c869da6 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_environment_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_sync] +from google.cloud import notebooks_v1 + + +def sample_delete_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_async.py new file mode 100644 index 0000000..da88ba7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_async] +from google.cloud import notebooks_v1 + + +async def sample_delete_execution(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteExecutionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_execution(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_sync.py new file mode 100644 index 0000000..11ed60e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_execution_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_sync] +from google.cloud import notebooks_v1 + + +def sample_delete_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteExecutionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_execution(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_async.py new file mode 100644 index 0000000..7e23e2a --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_delete_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_sync.py new file mode 100644 index 0000000..1c4ffc9 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_delete_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_async.py new file mode 100644 index 0000000..b367f4d --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_async] +from google.cloud import notebooks_v1 + + +async def sample_delete_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_schedule(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_sync.py new file mode 100644 index 0000000..40c079a --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_delete_schedule_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_sync] +from google.cloud import notebooks_v1 + + +def sample_delete_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.DeleteScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_async.py new file mode 100644 index 0000000..43dc2e7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_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 GetEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_async] +from google.cloud import notebooks_v1 + + +async def sample_get_environment(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = await client.get_environment(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_sync.py new file mode 100644 index 0000000..147de31 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_environment_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 GetEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_sync] +from google.cloud import notebooks_v1 + + +def sample_get_environment(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_async.py new file mode 100644 index 0000000..6ca241f --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_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 GetExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetExecution_async] +from google.cloud import notebooks_v1 + + +async def sample_get_execution(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetExecutionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_execution(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetExecution_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_sync.py new file mode 100644 index 0000000..01cf2a9 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_execution_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 GetExecution +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetExecution_sync] +from google.cloud import notebooks_v1 + + +def sample_get_execution(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetExecutionRequest( + name="name_value", + ) + + # Make the request + response = client.get_execution(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetExecution_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_async.py new file mode 100644 index 0000000..522ebb8 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_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 GetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_get_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_async.py new file mode 100644 index 0000000..723e59c --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_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 GetInstanceHealth +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_async] +from google.cloud import notebooks_v1 + + +async def sample_get_instance_health(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceHealthRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance_health(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_sync.py new file mode 100644 index 0000000..7961760 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_health_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 GetInstanceHealth +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_sync] +from google.cloud import notebooks_v1 + + +def sample_get_instance_health(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceHealthRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance_health(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_sync.py new file mode 100644 index 0000000..48371d0 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_instance_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 GetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_get_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_async.py new file mode 100644 index 0000000..3efe289 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_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 GetSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetSchedule_async] +from google.cloud import notebooks_v1 + + +async def sample_get_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.GetScheduleRequest( + name="name_value", + ) + + # Make the request + response = await client.get_schedule(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetSchedule_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_sync.py new file mode 100644 index 0000000..41f4887 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_get_schedule_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 GetSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_GetSchedule_sync] +from google.cloud import notebooks_v1 + + +def sample_get_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.GetScheduleRequest( + name="name_value", + ) + + # Make the request + response = client.get_schedule(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_GetSchedule_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_async.py new file mode 100644 index 0000000..bdafb20 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_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 IsInstanceUpgradeable +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_async] +from google.cloud import notebooks_v1 + + +async def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = await client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_sync.py new file mode 100644 index 0000000..b68dc1b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_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 IsInstanceUpgradeable +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_sync] +from google.cloud import notebooks_v1 + + +def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_async.py new file mode 100644 index 0000000..01ee4b8 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_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 ListEnvironments +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_async] +from google.cloud import notebooks_v1 + + +async def sample_list_environments(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_sync.py new file mode 100644 index 0000000..f895099 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_environments_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 ListEnvironments +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_sync] +from google.cloud import notebooks_v1 + + +def sample_list_environments(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_async.py new file mode 100644 index 0000000..e9331a4 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_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 ListExecutions +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListExecutions_async] +from google.cloud import notebooks_v1 + + +async def sample_list_executions(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ListExecutionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_executions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListExecutions_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_sync.py new file mode 100644 index 0000000..0cb1e62 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_executions_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 ListExecutions +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListExecutions_sync] +from google.cloud import notebooks_v1 + + +def sample_list_executions(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListExecutionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_executions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListExecutions_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_async.py new file mode 100644 index 0000000..2652955 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_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 ListInstances +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListInstances_async] +from google.cloud import notebooks_v1 + + +async def sample_list_instances(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListInstances_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_sync.py new file mode 100644 index 0000000..0b87a87 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_instances_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 ListInstances +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListInstances_sync] +from google.cloud import notebooks_v1 + + +def sample_list_instances(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListInstances_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_async.py new file mode 100644 index 0000000..c5cc7c6 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_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 ListSchedules +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListSchedules_async] +from google.cloud import notebooks_v1 + + +async def sample_list_schedules(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ListSchedulesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schedules(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListSchedules_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_sync.py new file mode 100644 index 0000000..8bea047 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_list_schedules_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 ListSchedules +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ListSchedules_sync] +from google.cloud import notebooks_v1 + + +def sample_list_schedules(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ListSchedulesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schedules(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ListSchedules_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_async.py new file mode 100644 index 0000000..78fae59 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_async.py @@ -0,0 +1,50 @@ +# -*- 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 RegisterInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_register_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_sync.py new file mode 100644 index 0000000..8b38c44 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_register_instance_sync.py @@ -0,0 +1,50 @@ +# -*- 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 RegisterInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_register_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_async.py new file mode 100644 index 0000000..215ac4e --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_async.py @@ -0,0 +1,50 @@ +# -*- 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 ReportInstanceInfo +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_async] +from google.cloud import notebooks_v1 + + +async def sample_report_instance_info(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_sync.py new file mode 100644 index 0000000..5b251db --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_report_instance_info_sync.py @@ -0,0 +1,50 @@ +# -*- 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 ReportInstanceInfo +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_sync] +from google.cloud import notebooks_v1 + + +def sample_report_instance_info(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_async.py new file mode 100644 index 0000000..033ef21 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 ResetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ResetInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_reset_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ResetInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_sync.py new file mode 100644 index 0000000..08cf9b4 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_reset_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 ResetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_ResetInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_reset_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_ResetInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_async.py new file mode 100644 index 0000000..251fcd5 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_async.py @@ -0,0 +1,50 @@ +# -*- 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 RollbackInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_rollback_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.RollbackInstanceRequest( + name="name_value", + target_snapshot="target_snapshot_value", + ) + + # Make the request + operation = client.rollback_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_sync.py new file mode 100644 index 0000000..813086b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_rollback_instance_sync.py @@ -0,0 +1,50 @@ +# -*- 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 RollbackInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_rollback_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RollbackInstanceRequest( + name="name_value", + target_snapshot="target_snapshot_value", + ) + + # Make the request + operation = client.rollback_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_async.py new file mode 100644 index 0000000..fff9d49 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_async.py @@ -0,0 +1,51 @@ +# -*- 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 SetInstanceAccelerator +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_async] +from google.cloud import notebooks_v1 + + +async def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_sync.py new file mode 100644 index 0000000..db97c4c --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_sync.py @@ -0,0 +1,51 @@ +# -*- 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 SetInstanceAccelerator +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_sync] +from google.cloud import notebooks_v1 + + +def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_async.py new file mode 100644 index 0000000..3851385 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_async.py @@ -0,0 +1,49 @@ +# -*- 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 SetInstanceLabels +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_async] +from google.cloud import notebooks_v1 + + +async def sample_set_instance_labels(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_sync.py new file mode 100644 index 0000000..2ae8029 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_sync.py @@ -0,0 +1,49 @@ +# -*- 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 SetInstanceLabels +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_sync] +from google.cloud import notebooks_v1 + + +def sample_set_instance_labels(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_async.py new file mode 100644 index 0000000..439e6c6 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_async.py @@ -0,0 +1,50 @@ +# -*- 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 SetInstanceMachineType +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_async] +from google.cloud import notebooks_v1 + + +async def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_sync.py new file mode 100644 index 0000000..3830a4f --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_sync.py @@ -0,0 +1,50 @@ +# -*- 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 SetInstanceMachineType +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_sync] +from google.cloud import notebooks_v1 + + +def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_async.py new file mode 100644 index 0000000..5e8f233 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 StartInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_StartInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_start_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_StartInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_sync.py new file mode 100644 index 0000000..2645f61 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_start_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StartInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_StartInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_start_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_StartInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_async.py new file mode 100644 index 0000000..003890c --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 StopInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_StopInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_stop_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_StopInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_sync.py new file mode 100644 index 0000000..2fcf0ad --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_stop_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StopInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_StopInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_stop_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_StopInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_async.py new file mode 100644 index 0000000..ce0ef02 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_async.py @@ -0,0 +1,49 @@ +# -*- 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 TriggerSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_async] +from google.cloud import notebooks_v1 + + +async def sample_trigger_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.TriggerScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.trigger_schedule(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_sync.py new file mode 100644 index 0000000..c9f478d --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_sync.py @@ -0,0 +1,49 @@ +# -*- 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 TriggerSchedule +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_sync] +from google.cloud import notebooks_v1 + + +def sample_trigger_schedule(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.TriggerScheduleRequest( + name="name_value", + ) + + # Make the request + operation = client.trigger_schedule(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_async.py new file mode 100644 index 0000000..55bb4b4 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_async.py @@ -0,0 +1,49 @@ +# -*- 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 UpdateInstanceConfig +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_async] +from google.cloud import notebooks_v1 + + +async def sample_update_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_sync.py new file mode 100644 index 0000000..596cb88 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_instance_config_sync.py @@ -0,0 +1,49 @@ +# -*- 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 UpdateInstanceConfig +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_sync] +from google.cloud import notebooks_v1 + + +def sample_update_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_async.py new file mode 100644 index 0000000..f8895f2 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_async.py @@ -0,0 +1,49 @@ +# -*- 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 UpdateShieldedInstanceConfig +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_async] +from google.cloud import notebooks_v1 + + +async def sample_update_shielded_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateShieldedInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_shielded_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_sync.py new file mode 100644 index 0000000..b567a14 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_sync.py @@ -0,0 +1,49 @@ +# -*- 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 UpdateShieldedInstanceConfig +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_sync] +from google.cloud import notebooks_v1 + + +def sample_update_shielded_instance_config(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateShieldedInstanceConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.update_shielded_instance_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_async.py new file mode 100644 index 0000000..9c9b64b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 UpgradeInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_async] +from google.cloud import notebooks_v1 + + +async def sample_upgrade_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_async.py new file mode 100644 index 0000000..eefb706 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_async.py @@ -0,0 +1,50 @@ +# -*- 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 UpgradeInstanceInternal +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_async] +from google.cloud import notebooks_v1 + + +async def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_sync.py new file mode 100644 index 0000000..cfd3e51 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_sync.py @@ -0,0 +1,50 @@ +# -*- 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 UpgradeInstanceInternal +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_sync] +from google.cloud import notebooks_v1 + + +def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_sync.py new file mode 100644 index 0000000..0b93f12 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 UpgradeInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_sync] +from google.cloud import notebooks_v1 + + +def sample_upgrade_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_async.py new file mode 100644 index 0000000..060c0ae --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_async.py @@ -0,0 +1,55 @@ +# -*- 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 CreateEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_create_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + environment = notebooks_v1beta1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1beta1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_sync.py new file mode 100644 index 0000000..4185617 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_sync.py @@ -0,0 +1,55 @@ +# -*- 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 CreateEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_create_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + environment = notebooks_v1beta1.Environment() + environment.vm_image.image_name = "image_name_value" + environment.vm_image.project = "project_value" + + request = notebooks_v1beta1.CreateEnvironmentRequest( + parent="parent_value", + environment_id="environment_id_value", + environment=environment, + ) + + # Make the request + operation = client.create_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_async.py new file mode 100644 index 0000000..ab230b7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_async.py @@ -0,0 +1,56 @@ +# -*- 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 CreateInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_create_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + instance = notebooks_v1beta1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1beta1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_sync.py new file mode 100644 index 0000000..2e93923 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_sync.py @@ -0,0 +1,56 @@ +# -*- 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 CreateInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_create_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + instance = notebooks_v1beta1.Instance() + instance.vm_image.image_name = "image_name_value" + instance.vm_image.project = "project_value" + instance.machine_type = "machine_type_value" + + request = notebooks_v1beta1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_async.py new file mode 100644 index 0000000..91d59e0 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_delete_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_sync.py new file mode 100644 index 0000000..5cf417d --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_delete_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteEnvironmentRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_environment(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_async.py new file mode 100644 index 0000000..9703af4 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_delete_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_sync.py new file mode 100644 index 0000000..9edf0ee --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 DeleteInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_delete_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_async.py new file mode 100644 index 0000000..95d6adf --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_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 GetEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_get_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = await client.get_environment(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_sync.py new file mode 100644 index 0000000..781e5ec --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_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 GetEnvironment +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_get_environment(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetEnvironmentRequest( + name="name_value", + ) + + # Make the request + response = client.get_environment(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_async.py new file mode 100644 index 0000000..701a0a7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_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 GetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_get_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_sync.py new file mode 100644 index 0000000..464d19a --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_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 GetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_get_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_async.py new file mode 100644 index 0000000..88849a1 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_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 IsInstanceUpgradeable +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = await client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_sync.py new file mode 100644 index 0000000..5556544 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_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 IsInstanceUpgradeable +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_is_instance_upgradeable(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.IsInstanceUpgradeableRequest( + notebook_instance="notebook_instance_value", + ) + + # Make the request + response = client.is_instance_upgradeable(request=request) + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_async.py new file mode 100644 index 0000000..03fdfc5 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_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 ListEnvironments +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_list_environments(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_sync.py new file mode 100644 index 0000000..fb42914 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_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 ListEnvironments +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_list_environments(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListEnvironmentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_environments(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_async.py new file mode 100644 index 0000000..59aa4d7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_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 ListInstances +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_list_instances(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_sync.py new file mode 100644 index 0000000..fb8782a --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_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 ListInstances +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_list_instances(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_async.py new file mode 100644 index 0000000..f78d61c --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_async.py @@ -0,0 +1,50 @@ +# -*- 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 RegisterInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_register_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_sync.py new file mode 100644 index 0000000..26e38b7 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_sync.py @@ -0,0 +1,50 @@ +# -*- 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 RegisterInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_register_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.RegisterInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + ) + + # Make the request + operation = client.register_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_async.py new file mode 100644 index 0000000..8cb9deb --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_async.py @@ -0,0 +1,50 @@ +# -*- 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 ReportInstanceInfo +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_report_instance_info(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_sync.py new file mode 100644 index 0000000..1305506 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_sync.py @@ -0,0 +1,50 @@ +# -*- 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 ReportInstanceInfo +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_report_instance_info(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ReportInstanceInfoRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.report_instance_info(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_async.py new file mode 100644 index 0000000..d83524d --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 ResetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_reset_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_sync.py new file mode 100644 index 0000000..0481a8a --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 ResetInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_reset_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_async.py new file mode 100644 index 0000000..3a82cee --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_async.py @@ -0,0 +1,51 @@ +# -*- 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 SetInstanceAccelerator +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_sync.py new file mode 100644 index 0000000..2768fbc --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_sync.py @@ -0,0 +1,51 @@ +# -*- 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 SetInstanceAccelerator +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_set_instance_accelerator(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceAcceleratorRequest( + name="name_value", + type_="TPU_V3", + core_count=1073, + ) + + # Make the request + operation = client.set_instance_accelerator(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_async.py new file mode 100644 index 0000000..b115b60 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_async.py @@ -0,0 +1,49 @@ +# -*- 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 SetInstanceLabels +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_set_instance_labels(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_sync.py new file mode 100644 index 0000000..05a925b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_sync.py @@ -0,0 +1,49 @@ +# -*- 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 SetInstanceLabels +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_set_instance_labels(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceLabelsRequest( + name="name_value", + ) + + # Make the request + operation = client.set_instance_labels(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_async.py new file mode 100644 index 0000000..3968b68 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_async.py @@ -0,0 +1,50 @@ +# -*- 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 SetInstanceMachineType +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_sync.py new file mode 100644 index 0000000..3bb6d50 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_sync.py @@ -0,0 +1,50 @@ +# -*- 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 SetInstanceMachineType +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_set_instance_machine_type(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.SetInstanceMachineTypeRequest( + name="name_value", + machine_type="machine_type_value", + ) + + # Make the request + operation = client.set_instance_machine_type(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_async.py new file mode 100644 index 0000000..0f6bf70 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 StartInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_start_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_sync.py new file mode 100644 index 0000000..9f6fa63 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StartInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_start_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_async.py new file mode 100644 index 0000000..2eb7bf9 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 StopInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_stop_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_sync.py new file mode 100644 index 0000000..dbf1bb2 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 StopInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_stop_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_async.py new file mode 100644 index 0000000..0e649e9 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_async.py @@ -0,0 +1,49 @@ +# -*- 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 UpgradeInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_upgrade_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_async.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_async.py new file mode 100644 index 0000000..2002688 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_async.py @@ -0,0 +1,50 @@ +# -*- 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 UpgradeInstanceInternal +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_async] +from google.cloud import notebooks_v1beta1 + + +async def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1beta1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_async] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_sync.py new file mode 100644 index 0000000..e51bc30 --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_sync.py @@ -0,0 +1,50 @@ +# -*- 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 UpgradeInstanceInternal +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_upgrade_instance_internal(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + operation = client.upgrade_instance_internal(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_sync] diff --git a/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_sync.py b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_sync.py new file mode 100644 index 0000000..8f9bb5b --- /dev/null +++ b/samples/generated_samples/notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_sync.py @@ -0,0 +1,49 @@ +# -*- 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 UpgradeInstance +# 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-notebooks + + +# [START notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_sync] +from google.cloud import notebooks_v1beta1 + + +def sample_upgrade_instance(): + # Create a client + client = notebooks_v1beta1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1beta1.UpgradeInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_sync] diff --git a/samples/generated_samples/snippet_metadata_notebooks_v1.json b/samples/generated_samples/snippet_metadata_notebooks_v1.json new file mode 100644 index 0000000..58d5fd4 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_notebooks_v1.json @@ -0,0 +1,3653 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "CreateRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "CreateRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_create_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_CreateRuntime_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "DeleteRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "DeleteRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_delete_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_DeleteRuntime_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "GetRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_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": "ManagedNotebookService" + }, + "shortName": "GetRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_get_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_GetRuntime_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": "ManagedNotebookService" + }, + "shortName": "ListRuntimes" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_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": "ManagedNotebookService" + }, + "shortName": "ListRuntimes" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_list_runtimes_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ListRuntimes_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": "ManagedNotebookService" + }, + "shortName": "ReportRuntimeEvent" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "ReportRuntimeEvent" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_report_runtime_event_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ReportRuntimeEvent_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "ResetRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "ResetRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_reset_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_ResetRuntime_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "StartRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "StartRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_start_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_StartRuntime_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "StopRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "StopRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_stop_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_StopRuntime_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "SwitchRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_async.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ManagedNotebookService" + }, + "shortName": "SwitchRuntime" + } + }, + "file": "notebooks_generated_notebooks_v1_managed_notebook_service_switch_runtime_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_ManagedNotebookService_SwitchRuntime_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateEnvironment_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_execution_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateExecution_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_execution_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateExecution_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_schedule_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_create_schedule_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_CreateSchedule_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteEnvironment_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_execution_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_execution_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteExecution_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_schedule_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_delete_schedule_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_DeleteSchedule_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_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": "NotebookService" + }, + "shortName": "GetEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetEnvironment_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": "NotebookService" + }, + "shortName": "GetExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_execution_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetExecution_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": "NotebookService" + }, + "shortName": "GetExecution" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_execution_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetExecution_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": "NotebookService" + }, + "shortName": "GetInstanceHealth" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_instance_health_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_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": "NotebookService" + }, + "shortName": "GetInstanceHealth" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_instance_health_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetInstanceHealth_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": "NotebookService" + }, + "shortName": "GetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetInstance_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": "NotebookService" + }, + "shortName": "GetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetInstance_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": "NotebookService" + }, + "shortName": "GetSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_schedule_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetSchedule_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": "NotebookService" + }, + "shortName": "GetSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_get_schedule_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_GetSchedule_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": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_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": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_is_instance_upgradeable_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_IsInstanceUpgradeable_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": "NotebookService" + }, + "shortName": "ListEnvironments" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_environments_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_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": "NotebookService" + }, + "shortName": "ListEnvironments" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_environments_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListEnvironments_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": "NotebookService" + }, + "shortName": "ListExecutions" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_executions_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListExecutions_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": "NotebookService" + }, + "shortName": "ListExecutions" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_executions_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListExecutions_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": "NotebookService" + }, + "shortName": "ListInstances" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_instances_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListInstances_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": "NotebookService" + }, + "shortName": "ListInstances" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_instances_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListInstances_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": "NotebookService" + }, + "shortName": "ListSchedules" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_schedules_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListSchedules_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": "NotebookService" + }, + "shortName": "ListSchedules" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_list_schedules_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ListSchedules_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": "NotebookService" + }, + "shortName": "RegisterInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_register_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_register_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_RegisterInstance_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_report_instance_info_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_report_instance_info_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ReportInstanceInfo_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_reset_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ResetInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_reset_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_ResetInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "RollbackInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_rollback_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "RollbackInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_rollback_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_RollbackInstance_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_accelerator_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceAccelerator_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_labels_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceLabels_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_set_instance_machine_type_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_SetInstanceMachineType_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_start_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_StartInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_start_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_StartInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_stop_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_StopInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_stop_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_StopInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "TriggerSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "TriggerSchedule" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_trigger_schedule_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_TriggerSchedule_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceConfig" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_update_instance_config_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceConfig" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_update_instance_config_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpdateInstanceConfig_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpdateShieldedInstanceConfig" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpdateShieldedInstanceConfig" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_update_shielded_instance_config_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpdateShieldedInstanceConfig_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_internal_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpgradeInstanceInternal_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + } + }, + "file": "notebooks_generated_notebooks_v1_notebook_service_upgrade_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1_NotebookService_UpgradeInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_notebooks_v1beta1.json b/samples/generated_samples/snippet_metadata_notebooks_v1beta1.json new file mode 100644 index 0000000..f61c9aa --- /dev/null +++ b/samples/generated_samples/snippet_metadata_notebooks_v1beta1.json @@ -0,0 +1,1695 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_create_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_CreateEnvironment_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_create_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_CreateInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_delete_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_DeleteEnvironment_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_delete_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_DeleteInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_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": "NotebookService" + }, + "shortName": "GetEnvironment" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_get_environment_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_GetEnvironment_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": "NotebookService" + }, + "shortName": "GetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_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": "NotebookService" + }, + "shortName": "GetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_get_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_GetInstance_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": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_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": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_is_instance_upgradeable_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_IsInstanceUpgradeable_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": "NotebookService" + }, + "shortName": "ListEnvironments" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_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": "NotebookService" + }, + "shortName": "ListEnvironments" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_list_environments_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ListEnvironments_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": "NotebookService" + }, + "shortName": "ListInstances" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_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": "NotebookService" + }, + "shortName": "ListInstances" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_list_instances_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ListInstances_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": "NotebookService" + }, + "shortName": "RegisterInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_register_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_RegisterInstance_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_report_instance_info_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ReportInstanceInfo_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_reset_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_ResetInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_accelerator_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceAccelerator_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_labels_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceLabels_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_set_instance_machine_type_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_SetInstanceMachineType_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_start_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_StartInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_stop_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_StopInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_internal_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstanceInternal_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_async.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + } + }, + "file": "notebooks_generated_notebooks_v1beta1_notebook_service_upgrade_instance_sync.py", + "regionTag": "notebooks_generated_notebooks_v1beta1_NotebookService_UpgradeInstance_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +}