From 4d2c35a1cd0b68b6d481d5611ff820451273e859 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:01:30 -0400 Subject: [PATCH] fix: Add async context manager return types (#11448) Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../cloud/migrationcenter/gapic_version.py | 2 +- .../cloud/migrationcenter_v1/gapic_version.py | 2 +- .../services/migration_center/async_client.py | 2 +- .../migration_center/transports/rest.py | 2 +- .../types/migrationcenter.py | 8 +- .../google-cloud-migrationcenter/noxfile.py | 3 +- .../test_migration_center.py | 74 +- .../monitoring_metrics_scope/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../services/metrics_scopes/async_client.py | 2 +- .../noxfile.py | 3 +- ...s_scopes_create_monitored_project_async.py | 56 + ...cs_scopes_create_monitored_project_sync.py | 56 + ...s_scopes_delete_monitored_project_async.py | 56 + ...cs_scopes_delete_monitored_project_sync.py | 56 + ..._metrics_scopes_get_metrics_scope_async.py | 52 + ...d_metrics_scopes_get_metrics_scope_sync.py | 52 + ...trics_scopes_by_monitored_project_async.py | 52 + ...etrics_scopes_by_monitored_project_sync.py | 52 + ...ata_google.monitoring.metricsscope.v1.json | 659 ++ .../networkconnectivity/gapic_version.py | 2 +- .../networkconnectivity_v1/gapic_version.py | 2 +- .../services/hub_service/async_client.py | 2 +- .../gapic_version.py | 2 +- .../services/hub_service/async_client.py | 2 +- .../noxfile.py | 3 +- ..._generated_hub_service_create_hub_async.py | 57 + ...1_generated_hub_service_create_hub_sync.py | 57 + ...enerated_hub_service_create_spoke_async.py | 57 + ...generated_hub_service_create_spoke_sync.py | 57 + ..._generated_hub_service_delete_hub_async.py | 56 + ...1_generated_hub_service_delete_hub_sync.py | 56 + ...enerated_hub_service_delete_spoke_async.py | 56 + ...generated_hub_service_delete_spoke_sync.py | 56 + ..._v1_generated_hub_service_get_hub_async.py | 52 + ...y_v1_generated_hub_service_get_hub_sync.py | 52 + ...1_generated_hub_service_get_spoke_async.py | 52 + ...v1_generated_hub_service_get_spoke_sync.py | 52 + ...1_generated_hub_service_list_hubs_async.py | 53 + ...v1_generated_hub_service_list_hubs_sync.py | 53 + ...generated_hub_service_list_spokes_async.py | 53 + ..._generated_hub_service_list_spokes_sync.py | 53 + ..._generated_hub_service_update_hub_async.py | 55 + ...1_generated_hub_service_update_hub_sync.py | 55 + ...enerated_hub_service_update_spoke_async.py | 55 + ...generated_hub_service_update_spoke_sync.py | 55 + ..._generated_hub_service_create_hub_async.py | 56 + ...1_generated_hub_service_create_hub_sync.py | 56 + ...enerated_hub_service_create_spoke_async.py | 56 + ...generated_hub_service_create_spoke_sync.py | 56 + ..._generated_hub_service_delete_hub_async.py | 56 + ...1_generated_hub_service_delete_hub_sync.py | 56 + ...enerated_hub_service_delete_spoke_async.py | 56 + ...generated_hub_service_delete_spoke_sync.py | 56 + ...ha1_generated_hub_service_get_hub_async.py | 52 + ...pha1_generated_hub_service_get_hub_sync.py | 52 + ...1_generated_hub_service_get_spoke_async.py | 52 + ...a1_generated_hub_service_get_spoke_sync.py | 52 + ...1_generated_hub_service_list_hubs_async.py | 53 + ...a1_generated_hub_service_list_hubs_sync.py | 53 + ...generated_hub_service_list_spokes_async.py | 53 + ..._generated_hub_service_list_spokes_sync.py | 53 + ..._generated_hub_service_update_hub_async.py | 55 + ...1_generated_hub_service_update_hub_sync.py | 55 + ...enerated_hub_service_update_spoke_async.py | 55 + ...generated_hub_service_update_spoke_sync.py | 55 + ...a_google.cloud.networkconnectivity.v1.json | 1673 ++++ ...le.cloud.networkconnectivity.v1alpha1.json | 1673 ++++ .../test_hub_service.py | 12 +- .../test_hub_service.py | 12 +- .../cloud/network_management/gapic_version.py | 2 +- .../network_management_v1/gapic_version.py | 2 +- .../reachability_service/async_client.py | 2 +- ...ata_google.cloud.networkmanagement.v1.json | 2 +- .../test_reachability_service.py | 6 +- .../cloud/network_security/gapic_version.py | 2 +- .../network_security_v1/gapic_version.py | 2 +- .../services/network_security/async_client.py | 2 +- .../network_security/transports/rest.py | 6 +- .../network_security_v1beta1/gapic_version.py | 2 +- .../services/network_security/async_client.py | 2 +- .../google-cloud-network-security/noxfile.py | 3 +- ...urity_create_authorization_policy_async.py | 62 + ...curity_create_authorization_policy_sync.py | 62 + ...security_create_client_tls_policy_async.py | 61 + ..._security_create_client_tls_policy_sync.py | 61 + ...security_create_server_tls_policy_async.py | 61 + ..._security_create_server_tls_policy_sync.py | 61 + ...urity_delete_authorization_policy_async.py | 56 + ...curity_delete_authorization_policy_sync.py | 56 + ...security_delete_client_tls_policy_async.py | 56 + ..._security_delete_client_tls_policy_sync.py | 56 + ...security_delete_server_tls_policy_async.py | 56 + ..._security_delete_server_tls_policy_sync.py | 56 + ...security_get_authorization_policy_async.py | 52 + ..._security_get_authorization_policy_sync.py | 52 + ...rk_security_get_client_tls_policy_async.py | 52 + ...ork_security_get_client_tls_policy_sync.py | 52 + ...rk_security_get_server_tls_policy_async.py | 52 + ...ork_security_get_server_tls_policy_sync.py | 52 + ...urity_list_authorization_policies_async.py | 53 + ...curity_list_authorization_policies_sync.py | 53 + ...security_list_client_tls_policies_async.py | 53 + ..._security_list_client_tls_policies_sync.py | 53 + ...security_list_server_tls_policies_async.py | 53 + ..._security_list_server_tls_policies_sync.py | 53 + ...urity_update_authorization_policy_async.py | 60 + ...curity_update_authorization_policy_sync.py | 60 + ...security_update_client_tls_policy_async.py | 59 + ..._security_update_client_tls_policy_sync.py | 59 + ...security_update_server_tls_policy_async.py | 59 + ..._security_update_server_tls_policy_sync.py | 59 + ...urity_create_authorization_policy_async.py | 62 + ...curity_create_authorization_policy_sync.py | 62 + ...security_create_client_tls_policy_async.py | 61 + ..._security_create_client_tls_policy_sync.py | 61 + ...security_create_server_tls_policy_async.py | 61 + ..._security_create_server_tls_policy_sync.py | 61 + ...urity_delete_authorization_policy_async.py | 56 + ...curity_delete_authorization_policy_sync.py | 56 + ...security_delete_client_tls_policy_async.py | 56 + ..._security_delete_client_tls_policy_sync.py | 56 + ...security_delete_server_tls_policy_async.py | 56 + ..._security_delete_server_tls_policy_sync.py | 56 + ...security_get_authorization_policy_async.py | 52 + ..._security_get_authorization_policy_sync.py | 52 + ...rk_security_get_client_tls_policy_async.py | 52 + ...ork_security_get_client_tls_policy_sync.py | 52 + ...rk_security_get_server_tls_policy_async.py | 52 + ...ork_security_get_server_tls_policy_sync.py | 52 + ...urity_list_authorization_policies_async.py | 53 + ...curity_list_authorization_policies_sync.py | 53 + ...security_list_client_tls_policies_async.py | 53 + ..._security_list_client_tls_policies_sync.py | 53 + ...security_list_server_tls_policies_async.py | 53 + ..._security_list_server_tls_policies_sync.py | 53 + ...urity_update_authorization_policy_async.py | 60 + ...curity_update_authorization_policy_sync.py | 60 + ...security_update_client_tls_policy_async.py | 59 + ..._security_update_client_tls_policy_sync.py | 59 + ...security_update_server_tls_policy_async.py | 59 + ..._security_update_server_tls_policy_sync.py | 59 + ...adata_google.cloud.networksecurity.v1.json | 2502 +++++ ..._google.cloud.networksecurity.v1beta1.json | 2502 +++++ .../google-cloud-network-security/setup.py | 6 +- .../test_network_security.py | 18 +- .../test_network_security.py | 18 +- .../google/cloud/notebooks/gapic_version.py | 2 +- .../cloud/notebooks_v1/gapic_version.py | 2 +- .../managed_notebook_service/async_client.py | 2 +- .../services/notebook_service/async_client.py | 2 +- .../cloud/notebooks_v1beta1/gapic_version.py | 2 +- .../services/notebook_service/async_client.py | 2 +- .../notebook_service/transports/rest.py | 6 +- packages/google-cloud-notebooks/noxfile.py | 3 +- ...d_notebook_service_create_runtime_async.py | 57 + ...ed_notebook_service_create_runtime_sync.py | 57 + ...d_notebook_service_delete_runtime_async.py | 56 + ...ed_notebook_service_delete_runtime_sync.py | 56 + ...notebook_service_diagnose_runtime_async.py | 60 + ..._notebook_service_diagnose_runtime_sync.py | 60 + ...aged_notebook_service_get_runtime_async.py | 52 + ...naged_notebook_service_get_runtime_sync.py | 52 + ...ed_notebook_service_list_runtimes_async.py | 53 + ...ged_notebook_service_list_runtimes_sync.py | 53 + ...ce_refresh_runtime_token_internal_async.py | 53 + ...ice_refresh_runtime_token_internal_sync.py | 53 + ...book_service_report_runtime_event_async.py | 57 + ...ebook_service_report_runtime_event_sync.py | 57 + ...ed_notebook_service_reset_runtime_async.py | 56 + ...ged_notebook_service_reset_runtime_sync.py | 56 + ...ed_notebook_service_start_runtime_async.py | 56 + ...ged_notebook_service_start_runtime_sync.py | 56 + ...ged_notebook_service_stop_runtime_async.py | 56 + ...aged_notebook_service_stop_runtime_sync.py | 56 + ...d_notebook_service_switch_runtime_async.py | 56 + ...ed_notebook_service_switch_runtime_sync.py | 56 + ...d_notebook_service_update_runtime_async.py | 55 + ...ed_notebook_service_update_runtime_sync.py | 55 + ..._notebook_service_upgrade_runtime_async.py | 56 + ...d_notebook_service_upgrade_runtime_sync.py | 56 + ...tebook_service_create_environment_async.py | 62 + ...otebook_service_create_environment_sync.py | 62 + ...notebook_service_create_execution_async.py | 57 + ..._notebook_service_create_execution_sync.py | 57 + ..._notebook_service_create_instance_async.py | 63 + ...d_notebook_service_create_instance_sync.py | 63 + ..._notebook_service_create_schedule_async.py | 57 + ...d_notebook_service_create_schedule_sync.py | 57 + ...tebook_service_delete_environment_async.py | 56 + ...otebook_service_delete_environment_sync.py | 56 + ...notebook_service_delete_execution_async.py | 56 + ..._notebook_service_delete_execution_sync.py | 56 + ..._notebook_service_delete_instance_async.py | 56 + ...d_notebook_service_delete_instance_sync.py | 56 + ..._notebook_service_delete_schedule_async.py | 56 + ...d_notebook_service_delete_schedule_sync.py | 56 + ...otebook_service_diagnose_instance_async.py | 60 + ...notebook_service_diagnose_instance_sync.py | 60 + ..._notebook_service_get_environment_async.py | 52 + ...d_notebook_service_get_environment_sync.py | 52 + ...ed_notebook_service_get_execution_async.py | 52 + ...ted_notebook_service_get_execution_sync.py | 52 + ...ted_notebook_service_get_instance_async.py | 52 + ...ebook_service_get_instance_health_async.py | 52 + ...tebook_service_get_instance_health_sync.py | 52 + ...ated_notebook_service_get_instance_sync.py | 52 + ...ted_notebook_service_get_schedule_async.py | 52 + ...ated_notebook_service_get_schedule_sync.py | 52 + ...k_service_is_instance_upgradeable_async.py | 52 + ...ok_service_is_instance_upgradeable_sync.py | 52 + ...otebook_service_list_environments_async.py | 53 + ...notebook_service_list_environments_sync.py | 53 + ..._notebook_service_list_executions_async.py | 53 + ...d_notebook_service_list_executions_sync.py | 53 + ...d_notebook_service_list_instances_async.py | 53 + ...ed_notebook_service_list_instances_sync.py | 53 + ...d_notebook_service_list_schedules_async.py | 53 + ...ed_notebook_service_list_schedules_sync.py | 53 + ...otebook_service_register_instance_async.py | 57 + ...notebook_service_register_instance_sync.py | 57 + ...book_service_report_instance_info_async.py | 57 + ...ebook_service_report_instance_info_sync.py | 57 + ...d_notebook_service_reset_instance_async.py | 56 + ...ed_notebook_service_reset_instance_sync.py | 56 + ...otebook_service_rollback_instance_async.py | 57 + ...notebook_service_rollback_instance_sync.py | 57 + ..._service_set_instance_accelerator_async.py | 58 + ...k_service_set_instance_accelerator_sync.py | 58 + ...ebook_service_set_instance_labels_async.py | 56 + ...tebook_service_set_instance_labels_sync.py | 56 + ...service_set_instance_machine_type_async.py | 57 + ..._service_set_instance_machine_type_sync.py | 57 + ...d_notebook_service_start_instance_async.py | 56 + ...ed_notebook_service_start_instance_sync.py | 56 + ...ed_notebook_service_stop_instance_async.py | 56 + ...ted_notebook_service_stop_instance_sync.py | 56 + ...notebook_service_trigger_schedule_async.py | 56 + ..._notebook_service_trigger_schedule_sync.py | 56 + ...ok_service_update_instance_config_async.py | 56 + ...ook_service_update_instance_config_sync.py | 56 + ...ce_update_instance_metadata_items_async.py | 52 + ...ice_update_instance_metadata_items_sync.py | 52 + ...e_update_shielded_instance_config_async.py | 56 + ...ce_update_shielded_instance_config_sync.py | 56 + ...notebook_service_upgrade_instance_async.py | 56 + ...service_upgrade_instance_internal_async.py | 57 + ..._service_upgrade_instance_internal_sync.py | 57 + ..._notebook_service_upgrade_instance_sync.py | 56 + ...tebook_service_create_environment_async.py | 62 + ...otebook_service_create_environment_sync.py | 62 + ..._notebook_service_create_instance_async.py | 63 + ...d_notebook_service_create_instance_sync.py | 63 + ...tebook_service_delete_environment_async.py | 56 + ...otebook_service_delete_environment_sync.py | 56 + ..._notebook_service_delete_instance_async.py | 56 + ...d_notebook_service_delete_instance_sync.py | 56 + ..._notebook_service_get_environment_async.py | 52 + ...d_notebook_service_get_environment_sync.py | 52 + ...ted_notebook_service_get_instance_async.py | 52 + ...ated_notebook_service_get_instance_sync.py | 52 + ...k_service_is_instance_upgradeable_async.py | 52 + ...ok_service_is_instance_upgradeable_sync.py | 52 + ...otebook_service_list_environments_async.py | 53 + ...notebook_service_list_environments_sync.py | 53 + ...d_notebook_service_list_instances_async.py | 53 + ...ed_notebook_service_list_instances_sync.py | 53 + ...otebook_service_register_instance_async.py | 57 + ...notebook_service_register_instance_sync.py | 57 + ...book_service_report_instance_info_async.py | 57 + ...ebook_service_report_instance_info_sync.py | 57 + ...d_notebook_service_reset_instance_async.py | 56 + ...ed_notebook_service_reset_instance_sync.py | 56 + ..._service_set_instance_accelerator_async.py | 58 + ...k_service_set_instance_accelerator_sync.py | 58 + ...ebook_service_set_instance_labels_async.py | 56 + ...tebook_service_set_instance_labels_sync.py | 56 + ...service_set_instance_machine_type_async.py | 57 + ..._service_set_instance_machine_type_sync.py | 57 + ...d_notebook_service_start_instance_async.py | 56 + ...ed_notebook_service_start_instance_sync.py | 56 + ...ed_notebook_service_stop_instance_async.py | 56 + ...ted_notebook_service_stop_instance_sync.py | 56 + ...notebook_service_upgrade_instance_async.py | 56 + ...service_upgrade_instance_internal_async.py | 57 + ..._service_upgrade_instance_internal_sync.py | 57 + ..._notebook_service_upgrade_instance_sync.py | 56 + ...et_metadata_google.cloud.notebooks.v1.json | 7566 +++++++++++++++ ...tadata_google.cloud.notebooks.v1beta1.json | 2922 ++++++ .../test_managed_notebook_service.py | 7 +- .../notebooks_v1/test_notebook_service.py | 26 +- .../test_notebook_service.py | 16 +- .../airflow/service/gapic_version.py | 2 +- .../airflow/service_v1/gapic_version.py | 2 +- .../services/environments/async_client.py | 2 +- .../services/image_versions/async_client.py | 2 +- .../airflow/service_v1beta1/gapic_version.py | 2 +- .../services/environments/async_client.py | 2 +- .../services/image_versions/async_client.py | 2 +- .../noxfile.py | 3 +- .../gapic/service_v1/test_environments.py | 6 +- .../gapic/service_v1/test_image_versions.py | 6 +- .../service_v1beta1/test_environments.py | 6 +- .../service_v1beta1/test_image_versions.py | 6 +- .../cloud/phishingprotection/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../async_client.py | 2 +- .../noxfile.py | 3 +- ..._service_v1_beta1_report_phishing_async.py | 53 + ...n_service_v1_beta1_report_phishing_sync.py | 53 + ...ogle.cloud.phishingprotection.v1beta1.json | 184 + .../policytroubleshooter/gapic_version.py | 2 +- .../policytroubleshooter_v1/gapic_version.py | 2 +- .../services/iam_checker/async_client.py | 2 +- .../noxfile.py | 3 +- ...m_checker_troubleshoot_iam_policy_async.py | 51 + ...am_checker_troubleshoot_iam_policy_sync.py | 51 + ..._google.cloud.policytroubleshooter.v1.json | 168 + .../cloud/security/privateca/gapic_version.py | 2 +- .../security/privateca_v1/gapic_version.py | 2 +- .../async_client.py | 2 +- .../transports/rest.py | 6 +- .../privateca_v1beta1/gapic_version.py | 2 +- .../async_client.py | 2 +- packages/google-cloud-private-ca/noxfile.py | 3 +- ...ce_activate_certificate_authority_async.py | 61 + ...ice_activate_certificate_authority_sync.py | 61 + ..._authority_service_create_ca_pool_async.py | 61 + ...e_authority_service_create_ca_pool_sync.py | 61 + ...hority_service_create_certificate_async.py | 56 + ...vice_create_certificate_authority_async.py | 62 + ...rvice_create_certificate_authority_sync.py | 62 + ...thority_service_create_certificate_sync.py | 56 + ...rvice_create_certificate_template_async.py | 57 + ...ervice_create_certificate_template_sync.py | 57 + ..._authority_service_delete_ca_pool_async.py | 56 + ...e_authority_service_delete_ca_pool_sync.py | 56 + ...vice_delete_certificate_authority_async.py | 56 + ...rvice_delete_certificate_authority_sync.py | 56 + ...rvice_delete_certificate_template_async.py | 56 + ...ervice_delete_certificate_template_sync.py | 56 + ...ice_disable_certificate_authority_async.py | 56 + ...vice_disable_certificate_authority_sync.py | 56 + ...vice_enable_certificate_authority_async.py | 56 + ...rvice_enable_certificate_authority_sync.py | 56 + ..._authority_service_fetch_ca_certs_async.py | 52 + ...e_authority_service_fetch_ca_certs_sync.py | 52 + ...e_fetch_certificate_authority_csr_async.py | 52 + ...ce_fetch_certificate_authority_csr_sync.py | 52 + ...ate_authority_service_get_ca_pool_async.py | 52 + ...cate_authority_service_get_ca_pool_sync.py | 52 + ...authority_service_get_certificate_async.py | 52 + ...service_get_certificate_authority_async.py | 52 + ..._service_get_certificate_authority_sync.py | 52 + ...e_get_certificate_revocation_list_async.py | 52 + ...ce_get_certificate_revocation_list_sync.py | 52 + ..._authority_service_get_certificate_sync.py | 52 + ..._service_get_certificate_template_async.py | 52 + ...y_service_get_certificate_template_sync.py | 52 + ...e_authority_service_list_ca_pools_async.py | 53 + ...te_authority_service_list_ca_pools_sync.py | 53 + ...vice_list_certificate_authorities_async.py | 53 + ...rvice_list_certificate_authorities_sync.py | 53 + ...list_certificate_revocation_lists_async.py | 53 + ..._list_certificate_revocation_lists_sync.py | 53 + ...ervice_list_certificate_templates_async.py | 53 + ...service_list_certificate_templates_sync.py | 53 + ...thority_service_list_certificates_async.py | 53 + ...uthority_service_list_certificates_sync.py | 53 + ...hority_service_revoke_certificate_async.py | 53 + ...thority_service_revoke_certificate_sync.py | 53 + ...ce_undelete_certificate_authority_async.py | 56 + ...ice_undelete_certificate_authority_sync.py | 56 + ..._authority_service_update_ca_pool_async.py | 59 + ...e_authority_service_update_ca_pool_sync.py | 59 + ...hority_service_update_certificate_async.py | 55 + ...vice_update_certificate_authority_async.py | 60 + ...rvice_update_certificate_authority_sync.py | 60 + ...pdate_certificate_revocation_list_async.py | 55 + ...update_certificate_revocation_list_sync.py | 55 + ...thority_service_update_certificate_sync.py | 55 + ...rvice_update_certificate_template_async.py | 55 + ...ervice_update_certificate_template_sync.py | 55 + ...ce_activate_certificate_authority_async.py | 61 + ...ice_activate_certificate_authority_sync.py | 61 + ...hority_service_create_certificate_async.py | 56 + ...vice_create_certificate_authority_async.py | 64 + ...rvice_create_certificate_authority_sync.py | 64 + ...thority_service_create_certificate_sync.py | 56 + ...ice_disable_certificate_authority_async.py | 56 + ...vice_disable_certificate_authority_sync.py | 56 + ...vice_enable_certificate_authority_async.py | 56 + ...rvice_enable_certificate_authority_sync.py | 56 + ...e_fetch_certificate_authority_csr_async.py | 52 + ...ce_fetch_certificate_authority_csr_sync.py | 52 + ...authority_service_get_certificate_async.py | 52 + ...service_get_certificate_authority_async.py | 52 + ..._service_get_certificate_authority_sync.py | 52 + ...e_get_certificate_revocation_list_async.py | 52 + ...ce_get_certificate_revocation_list_sync.py | 52 + ..._authority_service_get_certificate_sync.py | 52 + ...ority_service_get_reusable_config_async.py | 52 + ...hority_service_get_reusable_config_sync.py | 52 + ...vice_list_certificate_authorities_async.py | 53 + ...rvice_list_certificate_authorities_sync.py | 53 + ...list_certificate_revocation_lists_async.py | 53 + ..._list_certificate_revocation_lists_sync.py | 53 + ...thority_service_list_certificates_async.py | 53 + ...uthority_service_list_certificates_sync.py | 53 + ...ity_service_list_reusable_configs_async.py | 53 + ...rity_service_list_reusable_configs_sync.py | 53 + ...ice_restore_certificate_authority_async.py | 56 + ...vice_restore_certificate_authority_sync.py | 56 + ...hority_service_revoke_certificate_async.py | 53 + ...thority_service_revoke_certificate_sync.py | 53 + ...dule_delete_certificate_authority_async.py | 56 + ...edule_delete_certificate_authority_sync.py | 56 + ...hority_service_update_certificate_async.py | 55 + ...vice_update_certificate_authority_async.py | 62 + ...rvice_update_certificate_authority_sync.py | 62 + ...pdate_certificate_revocation_list_async.py | 55 + ...update_certificate_revocation_list_sync.py | 55 + ...thority_service_update_certificate_sync.py | 55 + ...ta_google.cloud.security.privateca.v1.json | 4788 ++++++++++ ...ogle.cloud.security.privateca.v1beta1.json | 3291 +++++++ .../test_certificate_authority_service.py | 30 +- .../test_certificate_authority_service.py | 24 +- .../cloud/privatecatalog/gapic_version.py | 2 +- .../privatecatalog_v1beta1/gapic_version.py | 2 +- .../services/private_catalog/async_client.py | 2 +- .../google-cloud-private-catalog/noxfile.py | 3 +- ...d_private_catalog_search_catalogs_async.py | 53 + ...ed_private_catalog_search_catalogs_sync.py | 53 + ...d_private_catalog_search_products_async.py | 53 + ...ed_private_catalog_search_products_sync.py | 53 + ...d_private_catalog_search_versions_async.py | 54 + ...ed_private_catalog_search_versions_sync.py | 54 + ...a_google.cloud.privatecatalog.v1beta1.json | 474 + .../test_private_catalog.py | 18 +- .../cloud/security/publicca/gapic_version.py | 2 +- .../publicca_v1beta1/gapic_version.py | 2 +- .../async_client.py | 2 +- packages/google-cloud-public-ca/noxfile.py | 3 +- ...rvice_create_external_account_key_async.py | 52 + ...ervice_create_external_account_key_sync.py | 52 + ...oogle.cloud.security.publicca.v1beta1.json | 184 + .../rapidmigrationassessment/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../async_client.py | 2 +- .../transports/rest.py | 2 +- .../noxfile.py | 3 +- .../test_rapid_migration_assessment.py | 6 +- .../recaptchaenterprise/gapic_version.py | 2 +- .../recaptchaenterprise_v1/gapic_version.py | 2 +- .../async_client.py | 2 +- .../noxfile.py | 3 +- ...prise_service_annotate_assessment_async.py | 52 + ...rprise_service_annotate_assessment_sync.py | 52 + ...erprise_service_create_assessment_async.py | 52 + ...terprise_service_create_assessment_sync.py | 52 + ...cha_enterprise_service_create_key_async.py | 56 + ...tcha_enterprise_service_create_key_sync.py | 56 + ...cha_enterprise_service_delete_key_async.py | 50 + ...tcha_enterprise_service_delete_key_sync.py | 50 + ...aptcha_enterprise_service_get_key_async.py | 52 + ...captcha_enterprise_service_get_key_sync.py | 52 + ...ha_enterprise_service_get_metrics_async.py | 52 + ...cha_enterprise_service_get_metrics_sync.py | 52 + ...tcha_enterprise_service_list_keys_async.py | 53 + ...ptcha_enterprise_service_list_keys_sync.py | 53 + ...related_account_group_memberships_async.py | 53 + ..._related_account_group_memberships_sync.py | 53 + ...rvice_list_related_account_groups_async.py | 53 + ...ervice_list_related_account_groups_sync.py | 53 + ...ha_enterprise_service_migrate_key_async.py | 52 + ...cha_enterprise_service_migrate_key_sync.py | 52 + ...ervice_retrieve_legacy_secret_key_async.py | 52 + ...service_retrieve_legacy_secret_key_sync.py | 52 + ...related_account_group_memberships_async.py | 53 + ..._related_account_group_memberships_sync.py | 53 + ...cha_enterprise_service_update_key_async.py | 55 + ...tcha_enterprise_service_update_key_sync.py | 55 + ...a_google.cloud.recaptchaenterprise.v1.json | 2134 +++++ .../test_recaptcha_enterprise_service.py | 28 +- .../recommendationengine/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../services/catalog_service/async_client.py | 2 +- .../async_client.py | 2 +- .../prediction_service/async_client.py | 2 +- .../user_event_service/async_client.py | 2 +- .../noxfile.py | 3 +- ...talog_service_create_catalog_item_async.py | 58 + ...atalog_service_create_catalog_item_sync.py | 58 + ...talog_service_delete_catalog_item_async.py | 50 + ...atalog_service_delete_catalog_item_sync.py | 50 + ..._catalog_service_get_catalog_item_async.py | 52 + ...d_catalog_service_get_catalog_item_sync.py | 52 + ...alog_service_import_catalog_items_async.py | 56 + ...talog_service_import_catalog_items_sync.py | 56 + ...atalog_service_list_catalog_items_async.py | 53 + ...catalog_service_list_catalog_items_sync.py | 53 + ...talog_service_update_catalog_item_async.py | 58 + ...atalog_service_update_catalog_item_sync.py | 58 + ...e_prediction_api_key_registration_async.py | 52 + ...te_prediction_api_key_registration_sync.py | 52 + ...e_prediction_api_key_registration_async.py | 50 + ...te_prediction_api_key_registration_sync.py | 50 + ..._prediction_api_key_registrations_async.py | 53 + ...t_prediction_api_key_registrations_sync.py | 53 + ...erated_prediction_service_predict_async.py | 58 + ...nerated_prediction_service_predict_sync.py | 58 + ..._event_service_collect_user_event_async.py | 53 + ...r_event_service_collect_user_event_sync.py | 53 + ..._event_service_import_user_events_async.py | 56 + ...r_event_service_import_user_events_sync.py | 56 + ...er_event_service_list_user_events_async.py | 53 + ...ser_event_service_list_user_events_sync.py | 53 + ...r_event_service_purge_user_events_async.py | 57 + ...er_event_service_purge_user_events_sync.py | 57 + ...er_event_service_write_user_event_async.py | 57 + ...ser_event_service_write_user_event_sync.py | 57 + ...le.cloud.recommendationengine.v1beta1.json | 2570 +++++ .../test_catalog_service.py | 24 +- .../test_prediction_api_key_registry.py | 6 +- .../test_prediction_service.py | 6 +- .../test_user_event_service.py | 6 +- .../google/cloud/recommender/gapic_version.py | 2 +- .../cloud/recommender_v1/gapic_version.py | 2 +- .../services/recommender/async_client.py | 2 +- .../recommender_v1beta1/gapic_version.py | 2 +- .../services/recommender/async_client.py | 2 +- packages/google-cloud-recommender/noxfile.py | 3 +- ...generated_recommender_get_insight_async.py | 52 + ..._generated_recommender_get_insight_sync.py | 52 + ...commender_get_insight_type_config_async.py | 52 + ...ecommender_get_insight_type_config_sync.py | 52 + ...ed_recommender_get_recommendation_async.py | 52 + ...ted_recommender_get_recommendation_sync.py | 52 + ...ecommender_get_recommender_config_async.py | 52 + ...recommender_get_recommender_config_sync.py | 52 + ...nerated_recommender_list_insights_async.py | 53 + ...enerated_recommender_list_insights_sync.py | 53 + ..._recommender_list_recommendations_async.py | 53 + ...d_recommender_list_recommendations_sync.py | 53 + ...recommender_mark_insight_accepted_async.py | 53 + ..._recommender_mark_insight_accepted_sync.py | 53 + ...ender_mark_recommendation_claimed_async.py | 53 + ...mender_mark_recommendation_claimed_sync.py | 53 + ...mender_mark_recommendation_failed_async.py | 53 + ...mmender_mark_recommendation_failed_sync.py | 53 + ...der_mark_recommendation_succeeded_async.py | 53 + ...nder_mark_recommendation_succeeded_sync.py | 53 + ...mender_update_insight_type_config_async.py | 51 + ...mmender_update_insight_type_config_sync.py | 51 + ...mmender_update_recommender_config_async.py | 51 + ...ommender_update_recommender_config_sync.py | 51 + ...generated_recommender_get_insight_async.py | 52 + ..._generated_recommender_get_insight_sync.py | 52 + ...commender_get_insight_type_config_async.py | 52 + ...ecommender_get_insight_type_config_sync.py | 52 + ...ed_recommender_get_recommendation_async.py | 52 + ...ted_recommender_get_recommendation_sync.py | 52 + ...ecommender_get_recommender_config_async.py | 52 + ...recommender_get_recommender_config_sync.py | 52 + ...nerated_recommender_list_insights_async.py | 53 + ...enerated_recommender_list_insights_sync.py | 53 + ..._recommender_list_recommendations_async.py | 53 + ...d_recommender_list_recommendations_sync.py | 53 + ...recommender_mark_insight_accepted_async.py | 53 + ..._recommender_mark_insight_accepted_sync.py | 53 + ...ender_mark_recommendation_claimed_async.py | 53 + ...mender_mark_recommendation_claimed_sync.py | 53 + ...mender_mark_recommendation_failed_async.py | 53 + ...mmender_mark_recommendation_failed_sync.py | 53 + ...der_mark_recommendation_succeeded_async.py | 53 + ...nder_mark_recommendation_succeeded_sync.py | 53 + ...mender_update_insight_type_config_async.py | 51 + ...mmender_update_insight_type_config_sync.py | 51 + ...mmender_update_recommender_config_async.py | 51 + ...ommender_update_recommender_config_sync.py | 51 + ..._metadata_google.cloud.recommender.v1.json | 2035 ++++ ...data_google.cloud.recommender.v1beta1.json | 2035 ++++ .../gapic/recommender_v1/test_recommender.py | 12 +- .../recommender_v1beta1/test_recommender.py | 12 +- .../google/cloud/redis/gapic_version.py | 2 +- .../google/cloud/redis_v1/gapic_version.py | 2 +- .../services/cloud_redis/async_client.py | 2 +- .../cloud/redis_v1beta1/gapic_version.py | 2 +- .../services/cloud_redis/async_client.py | 2 +- packages/google-cloud-redis/noxfile.py | 3 +- ...rated_cloud_redis_create_instance_async.py | 63 + ...erated_cloud_redis_create_instance_sync.py | 63 + ...rated_cloud_redis_delete_instance_async.py | 56 + ...erated_cloud_redis_delete_instance_sync.py | 56 + ...rated_cloud_redis_export_instance_async.py | 60 + ...erated_cloud_redis_export_instance_sync.py | 60 + ...ted_cloud_redis_failover_instance_async.py | 56 + ...ated_cloud_redis_failover_instance_sync.py | 56 + ...enerated_cloud_redis_get_instance_async.py | 52 + ...ud_redis_get_instance_auth_string_async.py | 52 + ...oud_redis_get_instance_auth_string_sync.py | 52 + ...generated_cloud_redis_get_instance_sync.py | 52 + ...rated_cloud_redis_import_instance_async.py | 60 + ...erated_cloud_redis_import_instance_sync.py | 60 + ...erated_cloud_redis_list_instances_async.py | 53 + ...nerated_cloud_redis_list_instances_sync.py | 53 + ...loud_redis_reschedule_maintenance_async.py | 57 + ...cloud_redis_reschedule_maintenance_sync.py | 57 + ...rated_cloud_redis_update_instance_async.py | 61 + ...erated_cloud_redis_update_instance_sync.py | 61 + ...ated_cloud_redis_upgrade_instance_async.py | 57 + ...rated_cloud_redis_upgrade_instance_sync.py | 57 + ...rated_cloud_redis_create_instance_async.py | 63 + ...erated_cloud_redis_create_instance_sync.py | 63 + ...rated_cloud_redis_delete_instance_async.py | 56 + ...erated_cloud_redis_delete_instance_sync.py | 56 + ...rated_cloud_redis_export_instance_async.py | 60 + ...erated_cloud_redis_export_instance_sync.py | 60 + ...ted_cloud_redis_failover_instance_async.py | 56 + ...ated_cloud_redis_failover_instance_sync.py | 56 + ...enerated_cloud_redis_get_instance_async.py | 52 + ...ud_redis_get_instance_auth_string_async.py | 52 + ...oud_redis_get_instance_auth_string_sync.py | 52 + ...generated_cloud_redis_get_instance_sync.py | 52 + ...rated_cloud_redis_import_instance_async.py | 60 + ...erated_cloud_redis_import_instance_sync.py | 60 + ...erated_cloud_redis_list_instances_async.py | 53 + ...nerated_cloud_redis_list_instances_sync.py | 53 + ...loud_redis_reschedule_maintenance_async.py | 57 + ...cloud_redis_reschedule_maintenance_sync.py | 57 + ...rated_cloud_redis_update_instance_async.py | 61 + ...erated_cloud_redis_update_instance_sync.py | 61 + ...ated_cloud_redis_upgrade_instance_async.py | 57 + ...rated_cloud_redis_upgrade_instance_sync.py | 57 + ...nippet_metadata_google.cloud.redis.v1.json | 1858 ++++ ...t_metadata_google.cloud.redis.v1beta1.json | 1858 ++++ .../unit/gapic/redis_v1/test_cloud_redis.py | 6 +- .../gapic/redis_v1beta1/test_cloud_redis.py | 6 +- .../cloud/resourcemanager/gapic_version.py | 2 +- .../cloud/resourcemanager_v3/gapic_version.py | 2 +- .../services/folders/async_client.py | 2 +- .../services/organizations/async_client.py | 2 +- .../services/projects/async_client.py | 2 +- .../services/tag_bindings/async_client.py | 2 +- .../services/tag_holds/async_client.py | 2 +- .../services/tag_keys/async_client.py | 2 +- .../services/tag_values/async_client.py | 2 +- .../google-cloud-resource-manager/noxfile.py | 3 +- ...3_generated_folders_create_folder_async.py | 59 + ...v3_generated_folders_create_folder_sync.py | 59 + ...3_generated_folders_delete_folder_async.py | 56 + ...v3_generated_folders_delete_folder_sync.py | 56 + ...r_v3_generated_folders_get_folder_async.py | 52 + ...er_v3_generated_folders_get_folder_sync.py | 52 + ..._generated_folders_get_iam_policy_async.py | 53 + ...3_generated_folders_get_iam_policy_sync.py | 53 + ...v3_generated_folders_list_folders_async.py | 53 + ..._v3_generated_folders_list_folders_sync.py | 53 + ..._v3_generated_folders_move_folder_async.py | 57 + ...r_v3_generated_folders_move_folder_sync.py | 57 + ..._generated_folders_search_folders_async.py | 52 + ...3_generated_folders_search_folders_sync.py | 52 + ..._generated_folders_set_iam_policy_async.py | 53 + ...3_generated_folders_set_iam_policy_sync.py | 53 + ...ated_folders_test_iam_permissions_async.py | 54 + ...rated_folders_test_iam_permissions_sync.py | 54 + ...generated_folders_undelete_folder_async.py | 56 + ..._generated_folders_undelete_folder_sync.py | 56 + ...3_generated_folders_update_folder_async.py | 59 + ...v3_generated_folders_update_folder_sync.py | 59 + ...ated_organizations_get_iam_policy_async.py | 53 + ...rated_organizations_get_iam_policy_sync.py | 53 + ...ed_organizations_get_organization_async.py | 52 + ...ted_organizations_get_organization_sync.py | 52 + ...rganizations_search_organizations_async.py | 52 + ...organizations_search_organizations_sync.py | 52 + ...ated_organizations_set_iam_policy_async.py | 53 + ...rated_organizations_set_iam_policy_sync.py | 53 + ...rganizations_test_iam_permissions_async.py | 54 + ...organizations_test_iam_permissions_sync.py | 54 + ...generated_projects_create_project_async.py | 55 + ..._generated_projects_create_project_sync.py | 55 + ...generated_projects_delete_project_async.py | 56 + ..._generated_projects_delete_project_sync.py | 56 + ...generated_projects_get_iam_policy_async.py | 53 + ..._generated_projects_get_iam_policy_sync.py | 53 + ...v3_generated_projects_get_project_async.py | 52 + ..._v3_generated_projects_get_project_sync.py | 52 + ..._generated_projects_list_projects_async.py | 53 + ...3_generated_projects_list_projects_sync.py | 53 + ...3_generated_projects_move_project_async.py | 57 + ...v3_generated_projects_move_project_sync.py | 57 + ...enerated_projects_search_projects_async.py | 52 + ...generated_projects_search_projects_sync.py | 52 + ...generated_projects_set_iam_policy_async.py | 53 + ..._generated_projects_set_iam_policy_sync.py | 53 + ...ted_projects_test_iam_permissions_async.py | 54 + ...ated_projects_test_iam_permissions_sync.py | 54 + ...nerated_projects_undelete_project_async.py | 56 + ...enerated_projects_undelete_project_sync.py | 56 + ...generated_projects_update_project_async.py | 55 + ..._generated_projects_update_project_sync.py | 55 + ...d_tag_bindings_create_tag_binding_async.py | 55 + ...ed_tag_bindings_create_tag_binding_sync.py | 55 + ...d_tag_bindings_delete_tag_binding_async.py | 56 + ...ed_tag_bindings_delete_tag_binding_sync.py | 56 + ..._tag_bindings_list_effective_tags_async.py | 53 + ...d_tag_bindings_list_effective_tags_sync.py | 53 + ...ed_tag_bindings_list_tag_bindings_async.py | 53 + ...ted_tag_bindings_list_tag_bindings_sync.py | 53 + ...nerated_tag_holds_create_tag_hold_async.py | 60 + ...enerated_tag_holds_create_tag_hold_sync.py | 60 + ...nerated_tag_holds_delete_tag_hold_async.py | 56 + ...enerated_tag_holds_delete_tag_hold_sync.py | 56 + ...enerated_tag_holds_list_tag_holds_async.py | 53 + ...generated_tag_holds_list_tag_holds_sync.py | 53 + ...generated_tag_keys_create_tag_key_async.py | 59 + ..._generated_tag_keys_create_tag_key_sync.py | 59 + ...generated_tag_keys_delete_tag_key_async.py | 56 + ..._generated_tag_keys_delete_tag_key_sync.py | 56 + ...generated_tag_keys_get_iam_policy_async.py | 53 + ..._generated_tag_keys_get_iam_policy_sync.py | 53 + ...d_tag_keys_get_namespaced_tag_key_async.py | 52 + ...ed_tag_keys_get_namespaced_tag_key_sync.py | 52 + ...v3_generated_tag_keys_get_tag_key_async.py | 52 + ..._v3_generated_tag_keys_get_tag_key_sync.py | 52 + ..._generated_tag_keys_list_tag_keys_async.py | 53 + ...3_generated_tag_keys_list_tag_keys_sync.py | 53 + ...generated_tag_keys_set_iam_policy_async.py | 53 + ..._generated_tag_keys_set_iam_policy_sync.py | 53 + ...ted_tag_keys_test_iam_permissions_async.py | 54 + ...ated_tag_keys_test_iam_permissions_sync.py | 54 + ...generated_tag_keys_update_tag_key_async.py | 59 + ..._generated_tag_keys_update_tag_key_sync.py | 59 + ...rated_tag_values_create_tag_value_async.py | 59 + ...erated_tag_values_create_tag_value_sync.py | 59 + ...rated_tag_values_delete_tag_value_async.py | 56 + ...erated_tag_values_delete_tag_value_sync.py | 56 + ...nerated_tag_values_get_iam_policy_async.py | 53 + ...enerated_tag_values_get_iam_policy_sync.py | 53 + ...g_values_get_namespaced_tag_value_async.py | 52 + ...ag_values_get_namespaced_tag_value_sync.py | 52 + ...enerated_tag_values_get_tag_value_async.py | 52 + ...generated_tag_values_get_tag_value_sync.py | 52 + ...erated_tag_values_list_tag_values_async.py | 53 + ...nerated_tag_values_list_tag_values_sync.py | 53 + ...nerated_tag_values_set_iam_policy_async.py | 53 + ...enerated_tag_values_set_iam_policy_sync.py | 53 + ...d_tag_values_test_iam_permissions_async.py | 54 + ...ed_tag_values_test_iam_permissions_sync.py | 54 + ...rated_tag_values_update_tag_value_async.py | 59 + ...erated_tag_values_update_tag_value_sync.py | 59 + ...adata_google.cloud.resourcemanager.v3.json | 8483 +++++++++++++++++ .../gapic/resourcemanager_v3/test_folders.py | 12 +- .../resourcemanager_v3/test_organizations.py | 6 +- .../gapic/resourcemanager_v3/test_projects.py | 12 +- .../resourcemanager_v3/test_tag_bindings.py | 12 +- .../resourcemanager_v3/test_tag_holds.py | 6 +- .../gapic/resourcemanager_v3/test_tag_keys.py | 6 +- .../resourcemanager_v3/test_tag_values.py | 6 +- .../cloud/resourcesettings/gapic_version.py | 2 +- .../resourcesettings_v1/gapic_version.py | 2 +- .../resource_settings_service/async_client.py | 2 +- .../google-cloud-resource-settings/noxfile.py | 3 +- ...urce_settings_service_get_setting_async.py | 52 + ...ource_settings_service_get_setting_sync.py | 52 + ...ce_settings_service_list_settings_async.py | 53 + ...rce_settings_service_list_settings_sync.py | 53 + ...e_settings_service_update_setting_async.py | 51 + ...ce_settings_service_update_setting_sync.py | 51 + ...data_google.cloud.resourcesettings.v1.json | 490 + .../test_resource_settings_service.py | 6 +- .../cloud/secretmanager/gapic_version.py | 2 +- .../cloud/secretmanager_v1/gapic_version.py | 2 +- .../secret_manager_service/async_client.py | 2 +- .../secretmanager_v1beta1/gapic_version.py | 2 +- .../secret_manager_service/async_client.py | 2 +- .../google-cloud-secret-manager/noxfile.py | 3 +- ...ger_service_access_secret_version_async.py | 52 + ...ager_service_access_secret_version_sync.py | 52 + ...anager_service_add_secret_version_async.py | 52 + ...manager_service_add_secret_version_sync.py | 52 + ...ret_manager_service_create_secret_async.py | 53 + ...cret_manager_service_create_secret_sync.py | 53 + ...ret_manager_service_delete_secret_async.py | 50 + ...cret_manager_service_delete_secret_sync.py | 50 + ...er_service_destroy_secret_version_async.py | 52 + ...ger_service_destroy_secret_version_sync.py | 52 + ...er_service_disable_secret_version_async.py | 52 + ...ger_service_disable_secret_version_sync.py | 52 + ...ger_service_enable_secret_version_async.py | 52 + ...ager_service_enable_secret_version_sync.py | 52 + ...et_manager_service_get_iam_policy_async.py | 53 + ...ret_manager_service_get_iam_policy_sync.py | 53 + ...secret_manager_service_get_secret_async.py | 52 + ..._secret_manager_service_get_secret_sync.py | 52 + ...anager_service_get_secret_version_async.py | 52 + ...manager_service_get_secret_version_sync.py | 52 + ...ager_service_list_secret_versions_async.py | 53 + ...nager_service_list_secret_versions_sync.py | 53 + ...cret_manager_service_list_secrets_async.py | 53 + ...ecret_manager_service_list_secrets_sync.py | 53 + ...et_manager_service_set_iam_policy_async.py | 53 + ...ret_manager_service_set_iam_policy_sync.py | 53 + ...ager_service_test_iam_permissions_async.py | 54 + ...nager_service_test_iam_permissions_sync.py | 54 + ...ret_manager_service_update_secret_async.py | 51 + ...cret_manager_service_update_secret_sync.py | 51 + ...ger_service_access_secret_version_async.py | 52 + ...ager_service_access_secret_version_sync.py | 52 + ...anager_service_add_secret_version_async.py | 52 + ...manager_service_add_secret_version_sync.py | 52 + ...ret_manager_service_create_secret_async.py | 53 + ...cret_manager_service_create_secret_sync.py | 53 + ...ret_manager_service_delete_secret_async.py | 50 + ...cret_manager_service_delete_secret_sync.py | 50 + ...er_service_destroy_secret_version_async.py | 52 + ...ger_service_destroy_secret_version_sync.py | 52 + ...er_service_disable_secret_version_async.py | 52 + ...ger_service_disable_secret_version_sync.py | 52 + ...ger_service_enable_secret_version_async.py | 52 + ...ager_service_enable_secret_version_sync.py | 52 + ...et_manager_service_get_iam_policy_async.py | 53 + ...ret_manager_service_get_iam_policy_sync.py | 53 + ...secret_manager_service_get_secret_async.py | 52 + ..._secret_manager_service_get_secret_sync.py | 52 + ...anager_service_get_secret_version_async.py | 52 + ...manager_service_get_secret_version_sync.py | 52 + ...ager_service_list_secret_versions_async.py | 53 + ...nager_service_list_secret_versions_sync.py | 53 + ...cret_manager_service_list_secrets_async.py | 53 + ...ecret_manager_service_list_secrets_sync.py | 53 + ...et_manager_service_set_iam_policy_async.py | 53 + ...ret_manager_service_set_iam_policy_sync.py | 53 + ...ager_service_test_iam_permissions_async.py | 54 + ...nager_service_test_iam_permissions_sync.py | 54 + ...ret_manager_service_update_secret_async.py | 51 + ...cret_manager_service_update_secret_sync.py | 51 + ...etadata_google.cloud.secretmanager.v1.json | 2432 +++++ ...metadata_google.cloud.secrets.v1beta1.json | 2432 +++++ .../test_secret_manager_service.py | 18 +- .../test_secret_manager_service.py | 12 +- 842 files changed, 91846 insertions(+), 347 deletions(-) create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py create mode 100644 packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/snippet_metadata_google.monitoring.metricsscope.v1.json create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1.json create mode 100644 packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py create mode 100644 packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1.json create mode 100644 packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1beta1.json create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1.json create mode 100644 packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1beta1.json create mode 100644 packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py create mode 100644 packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py create mode 100644 packages/google-cloud-phishing-protection/samples/generated_samples/snippet_metadata_google.cloud.phishingprotection.v1beta1.json create mode 100644 packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py create mode 100644 packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py create mode 100644 packages/google-cloud-policy-troubleshooter/samples/generated_samples/snippet_metadata_google.cloud.policytroubleshooter.v1.json create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1.json create mode 100644 packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1beta1.json create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py create mode 100644 packages/google-cloud-private-catalog/samples/generated_samples/snippet_metadata_google.cloud.privatecatalog.v1beta1.json create mode 100644 packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py create mode 100644 packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py create mode 100644 packages/google-cloud-public-ca/samples/generated_samples/snippet_metadata_google.cloud.security.publicca.v1beta1.json create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py create mode 100644 packages/google-cloud-recaptcha-enterprise/samples/generated_samples/snippet_metadata_google.cloud.recaptchaenterprise.v1.json create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py create mode 100644 packages/google-cloud-recommendations-ai/samples/generated_samples/snippet_metadata_google.cloud.recommendationengine.v1beta1.json create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_async.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_sync.py create mode 100644 packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1.json create mode 100644 packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1beta1.json create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py create mode 100644 packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1.json create mode 100644 packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1beta1.json create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py create mode 100644 packages/google-cloud-resource-manager/samples/generated_samples/snippet_metadata_google.cloud.resourcemanager.v3.json create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_async.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_async.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_async.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py create mode 100644 packages/google-cloud-resource-settings/samples/generated_samples/snippet_metadata_google.cloud.resourcesettings.v1.json create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secretmanager.v1.json create mode 100644 packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secrets.v1beta1.json diff --git a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter/gapic_version.py b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter/gapic_version.py +++ b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/gapic_version.py b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/gapic_version.py +++ b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/async_client.py b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/async_client.py index 4c695850a758..9b97893654fb 100644 --- a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/async_client.py +++ b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/async_client.py @@ -6158,7 +6158,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "MigrationCenterAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/transports/rest.py b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/transports/rest.py index a468aa070461..c48fde8ed4f4 100644 --- a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/transports/rest.py +++ b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/services/migration_center/transports/rest.py @@ -6870,7 +6870,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/types/migrationcenter.py b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/types/migrationcenter.py index 391372687602..f177809141a3 100644 --- a/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/types/migrationcenter.py +++ b/packages/google-cloud-migrationcenter/google/cloud/migrationcenter_v1/types/migrationcenter.py @@ -5467,7 +5467,7 @@ class Aggregation(proto.Message): Count the number of matching objects. This field is a member of `oneof`_ ``aggregation_function``. - sum_ (google.cloud.migrationcenter_v1.types.Aggregation.Sum): + sum (google.cloud.migrationcenter_v1.types.Aggregation.Sum): Sum over a numeric field. This field is a member of `oneof`_ ``aggregation_function``. @@ -5521,7 +5521,7 @@ class Frequency(proto.Message): oneof="aggregation_function", message=Count, ) - sum_: Sum = proto.Field( + sum: Sum = proto.Field( proto.MESSAGE, number=3, oneof="aggregation_function", @@ -5557,7 +5557,7 @@ class AggregationResult(proto.Message): count (google.cloud.migrationcenter_v1.types.AggregationResult.Count): This field is a member of `oneof`_ ``result``. - sum_ (google.cloud.migrationcenter_v1.types.AggregationResult.Sum): + sum (google.cloud.migrationcenter_v1.types.AggregationResult.Sum): This field is a member of `oneof`_ ``result``. histogram (google.cloud.migrationcenter_v1.types.AggregationResult.Histogram): @@ -5666,7 +5666,7 @@ class Frequency(proto.Message): oneof="result", message=Count, ) - sum_: Sum = proto.Field( + sum: Sum = proto.Field( proto.MESSAGE, number=3, oneof="result", diff --git a/packages/google-cloud-migrationcenter/noxfile.py b/packages/google-cloud-migrationcenter/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-migrationcenter/noxfile.py +++ b/packages/google-cloud-migrationcenter/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-migrationcenter/tests/unit/gapic/migrationcenter_v1/test_migration_center.py b/packages/google-cloud-migrationcenter/tests/unit/gapic/migrationcenter_v1/test_migration_center.py index d8eaef94768a..eef0314615df 100644 --- a/packages/google-cloud-migrationcenter/tests/unit/gapic/migrationcenter_v1/test_migration_center.py +++ b/packages/google-cloud-migrationcenter/tests/unit/gapic/migrationcenter_v1/test_migration_center.py @@ -1158,9 +1158,11 @@ async def test_list_assets_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_assets(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1190,7 +1192,6 @@ def test_get_asset(request_type, transport: str = "grpc"): name="name_value", sources=["sources_value"], assigned_groups=["assigned_groups_value"], - machine_details=migrationcenter.MachineDetails(uuid="uuid_value"), ) response = client.get_asset(request) @@ -1431,7 +1432,6 @@ def test_update_asset(request_type, transport: str = "grpc"): name="name_value", sources=["sources_value"], assigned_groups=["assigned_groups_value"], - machine_details=migrationcenter.MachineDetails(uuid="uuid_value"), ) response = client.update_asset(request) @@ -3384,9 +3384,11 @@ async def test_list_import_jobs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_import_jobs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3417,11 +3419,6 @@ def test_get_import_job(request_type, transport: str = "grpc"): display_name="display_name_value", state=migrationcenter.ImportJob.ImportJobState.IMPORT_JOB_STATE_PENDING, asset_source="asset_source_value", - validation_report=migrationcenter.ValidationReport( - file_validations=[ - migrationcenter.FileValidationReport(file_name="file_name_value") - ] - ), ) response = client.get_import_job(request) @@ -4631,9 +4628,6 @@ def test_get_import_data_file(request_type, transport: str = "grpc"): display_name="display_name_value", format_=migrationcenter.ImportJobFormat.IMPORT_JOB_FORMAT_RVTOOLS_XLSX, state=migrationcenter.ImportDataFile.State.CREATING, - upload_file_info=migrationcenter.UploadFileInfo( - signed_uri="signed_uri_value" - ), ) response = client.get_import_data_file(request) @@ -5311,9 +5305,11 @@ async def test_list_import_data_files_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_import_data_files(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6237,9 +6233,11 @@ async def test_list_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_groups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8113,9 +8111,11 @@ async def test_list_error_frames_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_error_frames(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8769,9 +8769,11 @@ async def test_list_sources_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_sources(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -10188,9 +10190,11 @@ async def test_list_preference_sets_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_preference_sets(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -12630,9 +12634,11 @@ async def test_list_report_configs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_report_configs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -13789,9 +13795,11 @@ async def test_list_reports_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_reports(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -14394,7 +14402,6 @@ def test_get_asset_rest(request_type): name="name_value", sources=["sources_value"], assigned_groups=["assigned_groups_value"], - machine_details=migrationcenter.MachineDetails(uuid="uuid_value"), ) # Wrap the value into a proper Response obj @@ -14925,7 +14932,6 @@ def test_update_asset_rest(request_type): name="name_value", sources=["sources_value"], assigned_groups=["assigned_groups_value"], - machine_details=migrationcenter.MachineDetails(uuid="uuid_value"), ) # Wrap the value into a proper Response obj @@ -17915,11 +17921,6 @@ def test_get_import_job_rest(request_type): display_name="display_name_value", state=migrationcenter.ImportJob.ImportJobState.IMPORT_JOB_STATE_PENDING, asset_source="asset_source_value", - validation_report=migrationcenter.ValidationReport( - file_validations=[ - migrationcenter.FileValidationReport(file_name="file_name_value") - ] - ), ) # Wrap the value into a proper Response obj @@ -19372,9 +19373,6 @@ def test_get_import_data_file_rest(request_type): display_name="display_name_value", format_=migrationcenter.ImportJobFormat.IMPORT_JOB_FORMAT_RVTOOLS_XLSX, state=migrationcenter.ImportDataFile.State.CREATING, - upload_file_info=migrationcenter.UploadFileInfo( - signed_uri="signed_uri_value" - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope/gapic_version.py b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope/gapic_version.py index f45c3f638494..30274cc6e9dd 100644 --- a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope/gapic_version.py +++ b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/gapic_version.py b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/gapic_version.py index f45c3f638494..30274cc6e9dd 100644 --- a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/gapic_version.py +++ b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/services/metrics_scopes/async_client.py b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/services/metrics_scopes/async_client.py index bc1c00e56f11..4d0f6cf40b57 100644 --- a/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/services/metrics_scopes/async_client.py +++ b/packages/google-cloud-monitoring-metrics-scopes/google/cloud/monitoring_metrics_scope_v1/services/metrics_scopes/async_client.py @@ -677,7 +677,7 @@ async def sample_delete_monitored_project(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "MetricsScopesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-monitoring-metrics-scopes/noxfile.py b/packages/google-cloud-monitoring-metrics-scopes/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-monitoring-metrics-scopes/noxfile.py +++ b/packages/google-cloud-monitoring-metrics-scopes/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py new file mode 100644 index 000000000000..f49395241660 --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +async def sample_create_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesAsyncClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.CreateMonitoredProjectRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_monitored_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_async] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py new file mode 100644 index 000000000000..57aa20724d74 --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +def sample_create_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.CreateMonitoredProjectRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_monitored_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_sync] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py new file mode 100644 index 000000000000..49ab9f4bb53d --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +async def sample_delete_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesAsyncClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.DeleteMonitoredProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_monitored_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_async] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py new file mode 100644 index 000000000000..c98cd13d7fee --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +def sample_delete_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.DeleteMonitoredProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_monitored_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_sync] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py new file mode 100644 index 000000000000..fd752709f096 --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetMetricsScope +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_GetMetricsScope_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +async def sample_get_metrics_scope(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesAsyncClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.GetMetricsScopeRequest( + name="name_value", + ) + + # Make the request + response = await client.get_metrics_scope(request=request) + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_GetMetricsScope_async] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py new file mode 100644 index 000000000000..75ba05300b67 --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetMetricsScope +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_GetMetricsScope_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +def sample_get_metrics_scope(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.GetMetricsScopeRequest( + name="name_value", + ) + + # Make the request + response = client.get_metrics_scope(request=request) + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_GetMetricsScope_sync] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py new file mode 100644 index 000000000000..0b444e64f3ae --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListMetricsScopesByMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +async def sample_list_metrics_scopes_by_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesAsyncClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.ListMetricsScopesByMonitoredProjectRequest( + monitored_resource_container="monitored_resource_container_value", + ) + + # Make the request + response = await client.list_metrics_scopes_by_monitored_project(request=request) + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_async] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py new file mode 100644 index 000000000000..f701af317661 --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListMetricsScopesByMonitoredProject +# 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-monitoring-metrics-scopes + + +# [START monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import monitoring_metrics_scope_v1 + + +def sample_list_metrics_scopes_by_monitored_project(): + # Create a client + client = monitoring_metrics_scope_v1.MetricsScopesClient() + + # Initialize request argument(s) + request = monitoring_metrics_scope_v1.ListMetricsScopesByMonitoredProjectRequest( + monitored_resource_container="monitored_resource_container_value", + ) + + # Make the request + response = client.list_metrics_scopes_by_monitored_project(request=request) + + # Handle the response + print(response) + +# [END monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_sync] diff --git a/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/snippet_metadata_google.monitoring.metricsscope.v1.json b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/snippet_metadata_google.monitoring.metricsscope.v1.json new file mode 100644 index 000000000000..0cc0413d2cdf --- /dev/null +++ b/packages/google-cloud-monitoring-metrics-scopes/samples/generated_samples/snippet_metadata_google.monitoring.metricsscope.v1.json @@ -0,0 +1,659 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.monitoring.metricsscope.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-monitoring-metrics-scopes", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient", + "shortName": "MetricsScopesAsyncClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient.create_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.CreateMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "CreateMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.CreateMonitoredProjectRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "monitored_project", + "type": "google.cloud.monitoring_metrics_scope_v1.types.MonitoredProject" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_monitored_project" + }, + "description": "Sample for CreateMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_create_monitored_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient", + "shortName": "MetricsScopesClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient.create_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.CreateMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "CreateMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.CreateMonitoredProjectRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "monitored_project", + "type": "google.cloud.monitoring_metrics_scope_v1.types.MonitoredProject" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_monitored_project" + }, + "description": "Sample for CreateMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_CreateMonitoredProject_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_create_monitored_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient", + "shortName": "MetricsScopesAsyncClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient.delete_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.DeleteMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "DeleteMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.DeleteMonitoredProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_monitored_project" + }, + "description": "Sample for DeleteMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_delete_monitored_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient", + "shortName": "MetricsScopesClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient.delete_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.DeleteMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "DeleteMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.DeleteMonitoredProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_monitored_project" + }, + "description": "Sample for DeleteMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_DeleteMonitoredProject_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_delete_monitored_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient", + "shortName": "MetricsScopesAsyncClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient.get_metrics_scope", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.GetMetricsScope", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "GetMetricsScope" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.GetMetricsScopeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.monitoring_metrics_scope_v1.types.MetricsScope", + "shortName": "get_metrics_scope" + }, + "description": "Sample for GetMetricsScope", + "file": "monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_GetMetricsScope_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_get_metrics_scope_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient", + "shortName": "MetricsScopesClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient.get_metrics_scope", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.GetMetricsScope", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "GetMetricsScope" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.GetMetricsScopeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.monitoring_metrics_scope_v1.types.MetricsScope", + "shortName": "get_metrics_scope" + }, + "description": "Sample for GetMetricsScope", + "file": "monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_GetMetricsScope_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_get_metrics_scope_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient", + "shortName": "MetricsScopesAsyncClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesAsyncClient.list_metrics_scopes_by_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.ListMetricsScopesByMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "ListMetricsScopesByMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectResponse", + "shortName": "list_metrics_scopes_by_monitored_project" + }, + "description": "Sample for ListMetricsScopesByMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient", + "shortName": "MetricsScopesClient" + }, + "fullName": "google.cloud.monitoring_metrics_scope_v1.MetricsScopesClient.list_metrics_scopes_by_monitored_project", + "method": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes.ListMetricsScopesByMonitoredProject", + "service": { + "fullName": "google.monitoring.metricsscope.v1.MetricsScopes", + "shortName": "MetricsScopes" + }, + "shortName": "ListMetricsScopesByMonitoredProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectResponse", + "shortName": "list_metrics_scopes_by_monitored_project" + }, + "description": "Sample for ListMetricsScopesByMonitoredProject", + "file": "monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "monitoring_v1_generated_MetricsScopes_ListMetricsScopesByMonitoredProject_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "monitoring_v1_generated_metrics_scopes_list_metrics_scopes_by_monitored_project_sync.py" + } + ] +} diff --git a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity/gapic_version.py b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity/gapic_version.py index d3b77d2e4406..30274cc6e9dd 100644 --- a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity/gapic_version.py +++ b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.0.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/gapic_version.py b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/gapic_version.py index d3b77d2e4406..30274cc6e9dd 100644 --- a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/gapic_version.py +++ b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.0.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/async_client.py b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/async_client.py index bf07f28517c4..408fb46f9e0e 100644 --- a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/async_client.py +++ b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/async_client.py @@ -2128,7 +2128,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "HubServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/gapic_version.py b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/gapic_version.py index d3b77d2e4406..30274cc6e9dd 100644 --- a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/gapic_version.py +++ b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.0.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/services/hub_service/async_client.py b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/services/hub_service/async_client.py index 3d8480ce844b..bb64e6059914 100644 --- a/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/services/hub_service/async_client.py +++ b/packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1alpha1/services/hub_service/async_client.py @@ -1464,7 +1464,7 @@ async def sample_delete_spoke(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "HubServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-network-connectivity/noxfile.py b/packages/google-cloud-network-connectivity/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-network-connectivity/noxfile.py +++ b/packages/google-cloud-network-connectivity/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_async.py new file mode 100644 index 000000000000..e48a19637b30 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_CreateHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_create_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.CreateHubRequest( + parent="parent_value", + hub_id="hub_id_value", + ) + + # Make the request + operation = client.create_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_CreateHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_sync.py new file mode 100644 index 000000000000..4fced0c0a3fb --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_hub_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_CreateHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_create_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.CreateHubRequest( + parent="parent_value", + hub_id="hub_id_value", + ) + + # Make the request + operation = client.create_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_CreateHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_async.py new file mode 100644 index 000000000000..5ba763c6b39c --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_CreateSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_create_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.CreateSpokeRequest( + parent="parent_value", + spoke_id="spoke_id_value", + ) + + # Make the request + operation = client.create_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_CreateSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_sync.py new file mode 100644 index 000000000000..36f5596d5133 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_create_spoke_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_CreateSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_create_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.CreateSpokeRequest( + parent="parent_value", + spoke_id="spoke_id_value", + ) + + # Make the request + operation = client.create_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_CreateSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_async.py new file mode 100644 index 000000000000..200a42afd8bf --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_DeleteHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_delete_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.DeleteHubRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_DeleteHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_sync.py new file mode 100644 index 000000000000..a5c8696ac0b9 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_hub_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_DeleteHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_delete_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.DeleteHubRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_DeleteHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_async.py new file mode 100644 index 000000000000..8861d36e9a58 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_DeleteSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_delete_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.DeleteSpokeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_DeleteSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py new file mode 100644 index 000000000000..75d671024e6e --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_DeleteSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_delete_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.DeleteSpokeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_DeleteSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_async.py new file mode 100644 index 000000000000..a7f2de580c04 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_GetHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_get_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.GetHubRequest( + name="name_value", + ) + + # Make the request + response = await client.get_hub(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_GetHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_sync.py new file mode 100644 index 000000000000..a80e4a3e048e --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_hub_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_GetHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_get_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.GetHubRequest( + name="name_value", + ) + + # Make the request + response = client.get_hub(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_GetHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_async.py new file mode 100644 index 000000000000..c3a219c13093 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_GetSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_get_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.GetSpokeRequest( + name="name_value", + ) + + # Make the request + response = await client.get_spoke(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_GetSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_sync.py new file mode 100644 index 000000000000..35f1e12ae41f --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_get_spoke_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_GetSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_get_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.GetSpokeRequest( + name="name_value", + ) + + # Make the request + response = client.get_spoke(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_GetSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_async.py new file mode 100644 index 000000000000..cd0bd3f99dd6 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListHubs +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_ListHubs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_list_hubs(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.ListHubsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hubs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networkconnectivity_v1_generated_HubService_ListHubs_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_sync.py new file mode 100644 index 000000000000..fe46e3c17683 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_hubs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListHubs +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_ListHubs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_list_hubs(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.ListHubsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hubs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networkconnectivity_v1_generated_HubService_ListHubs_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_async.py new file mode 100644 index 000000000000..09a7d4662440 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSpokes +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_ListSpokes_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_list_spokes(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.ListSpokesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_spokes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networkconnectivity_v1_generated_HubService_ListSpokes_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_sync.py new file mode 100644 index 000000000000..d818f9b14961 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_list_spokes_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSpokes +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_ListSpokes_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_list_spokes(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.ListSpokesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_spokes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networkconnectivity_v1_generated_HubService_ListSpokes_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_async.py new file mode 100644 index 000000000000..1ae39d642735 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_UpdateHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_update_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.UpdateHubRequest( + ) + + # Make the request + operation = client.update_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_UpdateHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_sync.py new file mode 100644 index 000000000000..42b32f6b7b1f --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_hub_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_UpdateHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_update_hub(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.UpdateHubRequest( + ) + + # Make the request + operation = client.update_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_UpdateHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_async.py new file mode 100644 index 000000000000..5e35352e016b --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_UpdateSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +async def sample_update_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.UpdateSpokeRequest( + ) + + # Make the request + operation = client.update_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_UpdateSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_sync.py new file mode 100644 index 000000000000..127ec16176ff --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1_generated_hub_service_update_spoke_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1_generated_HubService_UpdateSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1 + + +def sample_update_spoke(): + # Create a client + client = networkconnectivity_v1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1.UpdateSpokeRequest( + ) + + # Make the request + operation = client.update_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1_generated_HubService_UpdateSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py new file mode 100644 index 000000000000..2381c03beca2 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_CreateHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_create_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.CreateHubRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_CreateHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py new file mode 100644 index 000000000000..89913d868059 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_CreateHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_create_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.CreateHubRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_CreateHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py new file mode 100644 index 000000000000..3c03263f82d4 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_create_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.CreateSpokeRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py new file mode 100644 index 000000000000..ef6859ea4733 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_create_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.CreateSpokeRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py new file mode 100644 index 000000000000..1e841feee8ab --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_DeleteHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_delete_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.DeleteHubRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_DeleteHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py new file mode 100644 index 000000000000..b6b6b31c8106 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_DeleteHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_delete_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.DeleteHubRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_DeleteHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py new file mode 100644 index 000000000000..e8ccc8935a04 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_delete_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.DeleteSpokeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py new file mode 100644 index 000000000000..2203547a8c24 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_delete_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.DeleteSpokeRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py new file mode 100644 index 000000000000..da64263bb781 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_GetHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_get_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.GetHubRequest( + name="name_value", + ) + + # Make the request + response = await client.get_hub(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_GetHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py new file mode 100644 index 000000000000..0f9b42860153 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_GetHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_get_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.GetHubRequest( + name="name_value", + ) + + # Make the request + response = client.get_hub(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_GetHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py new file mode 100644 index 000000000000..355faa37446b --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_GetSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_get_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.GetSpokeRequest( + name="name_value", + ) + + # Make the request + response = await client.get_spoke(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_GetSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py new file mode 100644 index 000000000000..a3aca0d58f08 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_GetSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_get_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.GetSpokeRequest( + name="name_value", + ) + + # Make the request + response = client.get_spoke(request=request) + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_GetSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py new file mode 100644 index 000000000000..b9ad57686499 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListHubs +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_ListHubs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_list_hubs(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.ListHubsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hubs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_ListHubs_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py new file mode 100644 index 000000000000..664f7297fb27 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListHubs +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_ListHubs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_list_hubs(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.ListHubsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hubs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_ListHubs_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py new file mode 100644 index 000000000000..b43075a24580 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSpokes +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_ListSpokes_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_list_spokes(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.ListSpokesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_spokes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_ListSpokes_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py new file mode 100644 index 000000000000..03342119b790 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSpokes +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_ListSpokes_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_list_spokes(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.ListSpokesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_spokes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_ListSpokes_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py new file mode 100644 index 000000000000..70e290b02841 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_UpdateHub_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_update_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.UpdateHubRequest( + ) + + # Make the request + operation = client.update_hub(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_UpdateHub_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py new file mode 100644 index 000000000000..03b69deac9b8 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateHub +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_UpdateHub_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_update_hub(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.UpdateHubRequest( + ) + + # Make the request + operation = client.update_hub(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_UpdateHub_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py new file mode 100644 index 000000000000..f47c343d64cc --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +async def sample_update_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceAsyncClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.UpdateSpokeRequest( + ) + + # Make the request + operation = client.update_spoke(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_async] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py new file mode 100644 index 000000000000..3ef666a7f268 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSpoke +# 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-network-connectivity + + +# [START networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import networkconnectivity_v1alpha1 + + +def sample_update_spoke(): + # Create a client + client = networkconnectivity_v1alpha1.HubServiceClient() + + # Initialize request argument(s) + request = networkconnectivity_v1alpha1.UpdateSpokeRequest( + ) + + # Make the request + operation = client.update_spoke(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_sync] diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1.json b/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1.json new file mode 100644 index 000000000000..e1922ffbaae0 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1.json @@ -0,0 +1,1673 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.networkconnectivity.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-network-connectivity", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.create_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.CreateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.CreateHubRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1.types.Hub" + }, + { + "name": "hub_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_hub" + }, + "description": "Sample for CreateHub", + "file": "networkconnectivity_v1_generated_hub_service_create_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_CreateHub_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_create_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.create_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.CreateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.CreateHubRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1.types.Hub" + }, + { + "name": "hub_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_hub" + }, + "description": "Sample for CreateHub", + "file": "networkconnectivity_v1_generated_hub_service_create_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_CreateHub_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_create_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.create_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.CreateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.CreateSpokeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1.types.Spoke" + }, + { + "name": "spoke_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_spoke" + }, + "description": "Sample for CreateSpoke", + "file": "networkconnectivity_v1_generated_hub_service_create_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_CreateSpoke_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_create_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.create_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.CreateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.CreateSpokeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1.types.Spoke" + }, + { + "name": "spoke_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_spoke" + }, + "description": "Sample for CreateSpoke", + "file": "networkconnectivity_v1_generated_hub_service_create_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_CreateSpoke_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_create_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.delete_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.DeleteHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.DeleteHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_hub" + }, + "description": "Sample for DeleteHub", + "file": "networkconnectivity_v1_generated_hub_service_delete_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_DeleteHub_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_delete_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.delete_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.DeleteHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.DeleteHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_hub" + }, + "description": "Sample for DeleteHub", + "file": "networkconnectivity_v1_generated_hub_service_delete_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_DeleteHub_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_delete_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.delete_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.DeleteSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.DeleteSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_spoke" + }, + "description": "Sample for DeleteSpoke", + "file": "networkconnectivity_v1_generated_hub_service_delete_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_DeleteSpoke_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_delete_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.delete_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.DeleteSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.DeleteSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_spoke" + }, + "description": "Sample for DeleteSpoke", + "file": "networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_DeleteSpoke_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_delete_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.get_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.GetHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "GetHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.GetHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.types.Hub", + "shortName": "get_hub" + }, + "description": "Sample for GetHub", + "file": "networkconnectivity_v1_generated_hub_service_get_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_GetHub_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_get_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.get_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.GetHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "GetHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.GetHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.types.Hub", + "shortName": "get_hub" + }, + "description": "Sample for GetHub", + "file": "networkconnectivity_v1_generated_hub_service_get_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_GetHub_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_get_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.get_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.GetSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "GetSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.GetSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.types.Spoke", + "shortName": "get_spoke" + }, + "description": "Sample for GetSpoke", + "file": "networkconnectivity_v1_generated_hub_service_get_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_GetSpoke_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_get_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.get_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.GetSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "GetSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.GetSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.types.Spoke", + "shortName": "get_spoke" + }, + "description": "Sample for GetSpoke", + "file": "networkconnectivity_v1_generated_hub_service_get_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_GetSpoke_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_get_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.list_hubs", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.ListHubs", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "ListHubs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.ListHubsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.services.hub_service.pagers.ListHubsAsyncPager", + "shortName": "list_hubs" + }, + "description": "Sample for ListHubs", + "file": "networkconnectivity_v1_generated_hub_service_list_hubs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_ListHubs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_list_hubs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.list_hubs", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.ListHubs", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "ListHubs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.ListHubsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.services.hub_service.pagers.ListHubsPager", + "shortName": "list_hubs" + }, + "description": "Sample for ListHubs", + "file": "networkconnectivity_v1_generated_hub_service_list_hubs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_ListHubs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_list_hubs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.list_spokes", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.ListSpokes", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "ListSpokes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.ListSpokesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.services.hub_service.pagers.ListSpokesAsyncPager", + "shortName": "list_spokes" + }, + "description": "Sample for ListSpokes", + "file": "networkconnectivity_v1_generated_hub_service_list_spokes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_ListSpokes_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_list_spokes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.list_spokes", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.ListSpokes", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "ListSpokes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.ListSpokesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1.services.hub_service.pagers.ListSpokesPager", + "shortName": "list_spokes" + }, + "description": "Sample for ListSpokes", + "file": "networkconnectivity_v1_generated_hub_service_list_spokes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_ListSpokes_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_list_spokes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.update_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.UpdateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.UpdateHubRequest" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1.types.Hub" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_hub" + }, + "description": "Sample for UpdateHub", + "file": "networkconnectivity_v1_generated_hub_service_update_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_UpdateHub_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_update_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.update_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.UpdateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.UpdateHubRequest" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1.types.Hub" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_hub" + }, + "description": "Sample for UpdateHub", + "file": "networkconnectivity_v1_generated_hub_service_update_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_UpdateHub_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_update_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceAsyncClient.update_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.UpdateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.UpdateSpokeRequest" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1.types.Spoke" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_spoke" + }, + "description": "Sample for UpdateSpoke", + "file": "networkconnectivity_v1_generated_hub_service_update_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_UpdateSpoke_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_update_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1.HubServiceClient.update_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1.HubService.UpdateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1.types.UpdateSpokeRequest" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1.types.Spoke" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_spoke" + }, + "description": "Sample for UpdateSpoke", + "file": "networkconnectivity_v1_generated_hub_service_update_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1_generated_HubService_UpdateSpoke_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1_generated_hub_service_update_spoke_sync.py" + } + ] +} diff --git a/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json b/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json new file mode 100644 index 000000000000..7d9f482d0d17 --- /dev/null +++ b/packages/google-cloud-network-connectivity/samples/generated_samples/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json @@ -0,0 +1,1673 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.networkconnectivity.v1alpha1", + "version": "v1alpha1" + } + ], + "language": "PYTHON", + "name": "google-cloud-network-connectivity", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.create_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.CreateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.CreateHubRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Hub" + }, + { + "name": "hub_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_hub" + }, + "description": "Sample for CreateHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_CreateHub_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_create_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.create_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.CreateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.CreateHubRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Hub" + }, + { + "name": "hub_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_hub" + }, + "description": "Sample for CreateHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_CreateHub_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_create_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.create_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.CreateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.CreateSpokeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Spoke" + }, + { + "name": "spoke_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_spoke" + }, + "description": "Sample for CreateSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_create_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.create_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.CreateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "CreateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.CreateSpokeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Spoke" + }, + { + "name": "spoke_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_spoke" + }, + "description": "Sample for CreateSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_create_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.delete_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.DeleteHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.DeleteHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_hub" + }, + "description": "Sample for DeleteHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_DeleteHub_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_delete_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.delete_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.DeleteHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.DeleteHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_hub" + }, + "description": "Sample for DeleteHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_DeleteHub_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_delete_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.delete_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.DeleteSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.DeleteSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_spoke" + }, + "description": "Sample for DeleteSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.delete_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.DeleteSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "DeleteSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.DeleteSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_spoke" + }, + "description": "Sample for DeleteSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_delete_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.get_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.GetHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "GetHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.GetHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.types.Hub", + "shortName": "get_hub" + }, + "description": "Sample for GetHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_GetHub_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_get_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.get_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.GetHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "GetHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.GetHubRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.types.Hub", + "shortName": "get_hub" + }, + "description": "Sample for GetHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_GetHub_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_get_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.get_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.GetSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "GetSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.GetSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.types.Spoke", + "shortName": "get_spoke" + }, + "description": "Sample for GetSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_GetSpoke_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_get_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.get_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.GetSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "GetSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.GetSpokeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.types.Spoke", + "shortName": "get_spoke" + }, + "description": "Sample for GetSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_GetSpoke_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_get_spoke_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.list_hubs", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "ListHubs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.ListHubsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.services.hub_service.pagers.ListHubsAsyncPager", + "shortName": "list_hubs" + }, + "description": "Sample for ListHubs", + "file": "networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_ListHubs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_list_hubs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.list_hubs", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "ListHubs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.ListHubsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.services.hub_service.pagers.ListHubsPager", + "shortName": "list_hubs" + }, + "description": "Sample for ListHubs", + "file": "networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_ListHubs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_list_hubs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.list_spokes", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.ListSpokes", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "ListSpokes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.ListSpokesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.services.hub_service.pagers.ListSpokesAsyncPager", + "shortName": "list_spokes" + }, + "description": "Sample for ListSpokes", + "file": "networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_ListSpokes_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_list_spokes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.list_spokes", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.ListSpokes", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "ListSpokes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.ListSpokesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.networkconnectivity_v1alpha1.services.hub_service.pagers.ListSpokesPager", + "shortName": "list_spokes" + }, + "description": "Sample for ListSpokes", + "file": "networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_ListSpokes_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_list_spokes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.update_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.UpdateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.UpdateHubRequest" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Hub" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_hub" + }, + "description": "Sample for UpdateHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_UpdateHub_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_update_hub_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.update_hub", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.UpdateHub", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateHub" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.UpdateHubRequest" + }, + { + "name": "hub", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Hub" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_hub" + }, + "description": "Sample for UpdateHub", + "file": "networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_UpdateHub_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_update_hub_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient", + "shortName": "HubServiceAsyncClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceAsyncClient.update_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.UpdateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.UpdateSpokeRequest" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Spoke" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_spoke" + }, + "description": "Sample for UpdateSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_update_spoke_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient", + "shortName": "HubServiceClient" + }, + "fullName": "google.cloud.networkconnectivity_v1alpha1.HubServiceClient.update_spoke", + "method": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService.UpdateSpoke", + "service": { + "fullName": "google.cloud.networkconnectivity.v1alpha1.HubService", + "shortName": "HubService" + }, + "shortName": "UpdateSpoke" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.networkconnectivity_v1alpha1.types.UpdateSpokeRequest" + }, + { + "name": "spoke", + "type": "google.cloud.networkconnectivity_v1alpha1.types.Spoke" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_spoke" + }, + "description": "Sample for UpdateSpoke", + "file": "networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networkconnectivity_v1alpha1_generated_hub_service_update_spoke_sync.py" + } + ] +} diff --git a/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1/test_hub_service.py b/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1/test_hub_service.py index ea46b622314d..25362d10e0c4 100644 --- a/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1/test_hub_service.py +++ b/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1/test_hub_service.py @@ -1092,9 +1092,11 @@ async def test_list_hubs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_hubs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2464,9 +2466,11 @@ async def test_list_spokes_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_spokes(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1alpha1/test_hub_service.py b/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1alpha1/test_hub_service.py index 7b82946e05ec..1731e6fc92ef 100644 --- a/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1alpha1/test_hub_service.py +++ b/packages/google-cloud-network-connectivity/tests/unit/gapic/networkconnectivity_v1alpha1/test_hub_service.py @@ -1088,9 +1088,11 @@ async def test_list_hubs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_hubs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2464,9 +2466,11 @@ async def test_list_spokes_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_spokes(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-network-management/google/cloud/network_management/gapic_version.py b/packages/google-cloud-network-management/google/cloud/network_management/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-network-management/google/cloud/network_management/gapic_version.py +++ b/packages/google-cloud-network-management/google/cloud/network_management/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-management/google/cloud/network_management_v1/gapic_version.py b/packages/google-cloud-network-management/google/cloud/network_management_v1/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-network-management/google/cloud/network_management_v1/gapic_version.py +++ b/packages/google-cloud-network-management/google/cloud/network_management_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-management/google/cloud/network_management_v1/services/reachability_service/async_client.py b/packages/google-cloud-network-management/google/cloud/network_management_v1/services/reachability_service/async_client.py index e2b9213ffcdb..d8acf52d147e 100644 --- a/packages/google-cloud-network-management/google/cloud/network_management_v1/services/reachability_service/async_client.py +++ b/packages/google-cloud-network-management/google/cloud/network_management_v1/services/reachability_service/async_client.py @@ -997,7 +997,7 @@ async def sample_delete_connectivity_test(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ReachabilityServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-network-management/samples/generated_samples/snippet_metadata_google.cloud.networkmanagement.v1.json b/packages/google-cloud-network-management/samples/generated_samples/snippet_metadata_google.cloud.networkmanagement.v1.json index 4db54a8e3b78..21f45711959c 100644 --- a/packages/google-cloud-network-management/samples/generated_samples/snippet_metadata_google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-network-management/samples/generated_samples/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-network-management", - "version": "1.9.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-network-management/tests/unit/gapic/network_management_v1/test_reachability_service.py b/packages/google-cloud-network-management/tests/unit/gapic/network_management_v1/test_reachability_service.py index 1eb29b233be3..6be7e72f5ef6 100644 --- a/packages/google-cloud-network-management/tests/unit/gapic/network_management_v1/test_reachability_service.py +++ b/packages/google-cloud-network-management/tests/unit/gapic/network_management_v1/test_reachability_service.py @@ -1206,9 +1206,11 @@ async def test_list_connectivity_tests_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_connectivity_tests(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-network-security/google/cloud/network_security/gapic_version.py b/packages/google-cloud-network-security/google/cloud/network_security/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security/gapic_version.py +++ b/packages/google-cloud-network-security/google/cloud/network_security/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-security/google/cloud/network_security_v1/gapic_version.py b/packages/google-cloud-network-security/google/cloud/network_security_v1/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security_v1/gapic_version.py +++ b/packages/google-cloud-network-security/google/cloud/network_security_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/async_client.py b/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/async_client.py index 5008713b15c8..ed627ba79104 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/async_client.py +++ b/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/async_client.py @@ -2827,7 +2827,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "NetworkSecurityAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/transports/rest.py b/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/transports/rest.py index 1648af264032..3d8aea386887 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/transports/rest.py +++ b/packages/google-cloud-network-security/google/cloud/network_security_v1/services/network_security/transports/rest.py @@ -2796,7 +2796,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -2878,7 +2878,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -2947,7 +2947,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/gapic_version.py b/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/gapic_version.py +++ b/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/services/network_security/async_client.py b/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/services/network_security/async_client.py index 38ece705567f..b5a149aca981 100644 --- a/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/services/network_security/async_client.py +++ b/packages/google-cloud-network-security/google/cloud/network_security_v1beta1/services/network_security/async_client.py @@ -2827,7 +2827,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "NetworkSecurityAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-network-security/noxfile.py b/packages/google-cloud-network-security/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-network-security/noxfile.py +++ b/packages/google-cloud-network-security/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_async.py new file mode 100644 index 000000000000..c8477063a531 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_create_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1.CreateAuthorizationPolicyRequest( + parent="parent_value", + authorization_policy_id="authorization_policy_id_value", + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.create_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_sync.py new file mode 100644 index 000000000000..8c3feb8266f5 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_authorization_policy_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_create_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1.CreateAuthorizationPolicyRequest( + parent="parent_value", + authorization_policy_id="authorization_policy_id_value", + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.create_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_async.py new file mode 100644 index 000000000000..3213b4b2fbf0 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_create_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1.CreateClientTlsPolicyRequest( + parent="parent_value", + client_tls_policy_id="client_tls_policy_id_value", + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.create_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py new file mode 100644 index 000000000000..9cb44541687e --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_create_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1.CreateClientTlsPolicyRequest( + parent="parent_value", + client_tls_policy_id="client_tls_policy_id_value", + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.create_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_async.py new file mode 100644 index 000000000000..bfe83397ab04 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_create_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1.CreateServerTlsPolicyRequest( + parent="parent_value", + server_tls_policy_id="server_tls_policy_id_value", + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.create_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py new file mode 100644 index 000000000000..e04b108faa97 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_create_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1.CreateServerTlsPolicyRequest( + parent="parent_value", + server_tls_policy_id="server_tls_policy_id_value", + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.create_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_async.py new file mode 100644 index 000000000000..abdcbec63c67 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_delete_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py new file mode 100644 index 000000000000..ab16c181e268 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_delete_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py new file mode 100644 index 000000000000..9939ff014573 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_delete_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py new file mode 100644 index 000000000000..ba6861fc3155 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_delete_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py new file mode 100644 index 000000000000..0add2e07a9e9 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_delete_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py new file mode 100644 index 000000000000..a5c77abf9bcd --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_delete_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.DeleteServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_async.py new file mode 100644 index 000000000000..1f0f9b766bf1 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_get_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.GetAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_authorization_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_sync.py new file mode 100644 index 000000000000..469e628b7bd1 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_authorization_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_get_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.GetAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_authorization_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_async.py new file mode 100644 index 000000000000..cd9835b96e02 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_get_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.GetClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_client_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py new file mode 100644 index 000000000000..d594a5031e1b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_get_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.GetClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_client_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_async.py new file mode 100644 index 000000000000..2139312e5c4c --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_get_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.GetServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_server_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py new file mode 100644 index 000000000000..e2989b2ea38b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_get_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.GetServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_server_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_async.py new file mode 100644 index 000000000000..a5f00537a9d1 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListAuthorizationPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_list_authorization_policies(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.ListAuthorizationPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorization_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_sync.py new file mode 100644 index 000000000000..aab11454b4ec --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_authorization_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListAuthorizationPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_list_authorization_policies(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.ListAuthorizationPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorization_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_async.py new file mode 100644 index 000000000000..dcbb96e945e5 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListClientTlsPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_list_client_tls_policies(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.ListClientTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_tls_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py new file mode 100644 index 000000000000..3c47599f5c08 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListClientTlsPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_list_client_tls_policies(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.ListClientTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_tls_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_async.py new file mode 100644 index 000000000000..1edbe4fbbf89 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListServerTlsPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_list_server_tls_policies(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1.ListServerTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_server_tls_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py new file mode 100644 index 000000000000..7136cc7a57b9 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListServerTlsPolicies +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_list_server_tls_policies(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1.ListServerTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_server_tls_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_async.py new file mode 100644 index 000000000000..5aa7f270451f --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_update_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1.UpdateAuthorizationPolicyRequest( + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.update_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_sync.py new file mode 100644 index 000000000000..17c41937f1a7 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_authorization_policy_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_update_authorization_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1.UpdateAuthorizationPolicyRequest( + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.update_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_async.py new file mode 100644 index 000000000000..7cf4886fbf8b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_update_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1.UpdateClientTlsPolicyRequest( + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.update_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py new file mode 100644 index 000000000000..9bf7ce7ed803 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_update_client_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1.UpdateClientTlsPolicyRequest( + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.update_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_async.py new file mode 100644 index 000000000000..002c88d47ca7 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +async def sample_update_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1.UpdateServerTlsPolicyRequest( + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.update_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py new file mode 100644 index 000000000000..2299ed66dcab --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1 + + +def sample_update_server_tls_policy(): + # Create a client + client = network_security_v1.NetworkSecurityClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1.UpdateServerTlsPolicyRequest( + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.update_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py new file mode 100644 index 000000000000..54e46e054e71 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_create_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1beta1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1beta1.CreateAuthorizationPolicyRequest( + parent="parent_value", + authorization_policy_id="authorization_policy_id_value", + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.create_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py new file mode 100644 index 000000000000..64a47061774c --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_create_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1beta1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1beta1.CreateAuthorizationPolicyRequest( + parent="parent_value", + authorization_policy_id="authorization_policy_id_value", + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.create_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py new file mode 100644 index 000000000000..0c08b1d776e9 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_create_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1beta1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1beta1.CreateClientTlsPolicyRequest( + parent="parent_value", + client_tls_policy_id="client_tls_policy_id_value", + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.create_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py new file mode 100644 index 000000000000..7ea96cdbc964 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_create_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1beta1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1beta1.CreateClientTlsPolicyRequest( + parent="parent_value", + client_tls_policy_id="client_tls_policy_id_value", + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.create_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py new file mode 100644 index 000000000000..2134be879f78 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_create_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1beta1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1beta1.CreateServerTlsPolicyRequest( + parent="parent_value", + server_tls_policy_id="server_tls_policy_id_value", + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.create_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py new file mode 100644 index 000000000000..c648deda342c --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_create_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1beta1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1beta1.CreateServerTlsPolicyRequest( + parent="parent_value", + server_tls_policy_id="server_tls_policy_id_value", + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.create_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py new file mode 100644 index 000000000000..a4c73e2c4d42 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_delete_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py new file mode 100644 index 000000000000..2e1f9429b4a3 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_delete_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py new file mode 100644 index 000000000000..6082348348a0 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_delete_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py new file mode 100644 index 000000000000..302222af0e50 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_delete_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py new file mode 100644 index 000000000000..a42578d6b3c7 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_delete_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py new file mode 100644 index 000000000000..404ee8195bf6 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_delete_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.DeleteServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py new file mode 100644 index 000000000000..532ec5c08bfe --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_get_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_authorization_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py new file mode 100644 index 000000000000..6ac8cc9bfb61 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_get_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetAuthorizationPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_authorization_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py new file mode 100644 index 000000000000..19c9ac4669e7 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_get_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_client_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py new file mode 100644 index 000000000000..d179544ed749 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_get_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetClientTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_client_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py new file mode 100644 index 000000000000..4f32d904bb4b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_get_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_server_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py new file mode 100644 index 000000000000..cd85d290eef6 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_get_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.GetServerTlsPolicyRequest( + name="name_value", + ) + + # Make the request + response = client.get_server_tls_policy(request=request) + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py new file mode 100644 index 000000000000..7d900bec9a8e --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListAuthorizationPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_list_authorization_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListAuthorizationPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorization_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py new file mode 100644 index 000000000000..8253324e3fb5 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListAuthorizationPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_list_authorization_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListAuthorizationPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorization_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py new file mode 100644 index 000000000000..b8f8ff7ccd38 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListClientTlsPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_list_client_tls_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListClientTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_tls_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py new file mode 100644 index 000000000000..e8f1e50d2b7d --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListClientTlsPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_list_client_tls_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListClientTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_tls_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py new file mode 100644 index 000000000000..1c71134e327b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListServerTlsPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_list_server_tls_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListServerTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_server_tls_policies(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py new file mode 100644 index 000000000000..4209a5937e61 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListServerTlsPolicies +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_list_server_tls_policies(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + request = network_security_v1beta1.ListServerTlsPoliciesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_server_tls_policies(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py new file mode 100644 index 000000000000..129f26deeabd --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_update_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1beta1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1beta1.UpdateAuthorizationPolicyRequest( + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.update_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py new file mode 100644 index 000000000000..3675e9d60721 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateAuthorizationPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_update_authorization_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + authorization_policy = network_security_v1beta1.AuthorizationPolicy() + authorization_policy.name = "name_value" + authorization_policy.action = "DENY" + + request = network_security_v1beta1.UpdateAuthorizationPolicyRequest( + authorization_policy=authorization_policy, + ) + + # Make the request + operation = client.update_authorization_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py new file mode 100644 index 000000000000..14bacb221c9d --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_update_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1beta1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1beta1.UpdateClientTlsPolicyRequest( + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.update_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py new file mode 100644 index 000000000000..b494fc7fb9ae --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateClientTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_update_client_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + client_tls_policy = network_security_v1beta1.ClientTlsPolicy() + client_tls_policy.name = "name_value" + + request = network_security_v1beta1.UpdateClientTlsPolicyRequest( + client_tls_policy=client_tls_policy, + ) + + # Make the request + operation = client.update_client_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py new file mode 100644 index 000000000000..129880562a3b --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +async def sample_update_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityAsyncClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1beta1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1beta1.UpdateServerTlsPolicyRequest( + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.update_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_async] diff --git a/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py new file mode 100644 index 000000000000..44f4157fe1f1 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateServerTlsPolicy +# 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-network-security + + +# [START networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import network_security_v1beta1 + + +def sample_update_server_tls_policy(): + # Create a client + client = network_security_v1beta1.NetworkSecurityClient() + + # Initialize request argument(s) + server_tls_policy = network_security_v1beta1.ServerTlsPolicy() + server_tls_policy.name = "name_value" + + request = network_security_v1beta1.UpdateServerTlsPolicyRequest( + server_tls_policy=server_tls_policy, + ) + + # Make the request + operation = client.update_server_tls_policy(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1.json b/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1.json new file mode 100644 index 000000000000..0bc5339e0c8a --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1.json @@ -0,0 +1,2502 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.networksecurity.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-network-security", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.create_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateAuthorizationPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1.types.AuthorizationPolicy" + }, + { + "name": "authorization_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_authorization_policy" + }, + "description": "Sample for CreateAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_create_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.create_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateAuthorizationPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1.types.AuthorizationPolicy" + }, + { + "name": "authorization_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_authorization_policy" + }, + "description": "Sample for CreateAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_create_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.create_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateClientTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1.types.ClientTlsPolicy" + }, + { + "name": "client_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_client_tls_policy" + }, + "description": "Sample for CreateClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_create_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.create_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateClientTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1.types.ClientTlsPolicy" + }, + { + "name": "client_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_client_tls_policy" + }, + "description": "Sample for CreateClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.create_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateServerTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1.types.ServerTlsPolicy" + }, + { + "name": "server_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_server_tls_policy" + }, + "description": "Sample for CreateServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_create_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.create_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.CreateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.CreateServerTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1.types.ServerTlsPolicy" + }, + { + "name": "server_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_server_tls_policy" + }, + "description": "Sample for CreateServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_create_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.delete_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_authorization_policy" + }, + "description": "Sample for DeleteAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_delete_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.delete_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_authorization_policy" + }, + "description": "Sample for DeleteAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.delete_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_client_tls_policy" + }, + "description": "Sample for DeleteClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.delete_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_client_tls_policy" + }, + "description": "Sample for DeleteClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.delete_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_server_tls_policy" + }, + "description": "Sample for DeleteServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.delete_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.DeleteServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.DeleteServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_server_tls_policy" + }, + "description": "Sample for DeleteServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_delete_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.get_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.AuthorizationPolicy", + "shortName": "get_authorization_policy" + }, + "description": "Sample for GetAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_get_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.get_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.AuthorizationPolicy", + "shortName": "get_authorization_policy" + }, + "description": "Sample for GetAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_get_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.get_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.ClientTlsPolicy", + "shortName": "get_client_tls_policy" + }, + "description": "Sample for GetClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_get_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.get_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.ClientTlsPolicy", + "shortName": "get_client_tls_policy" + }, + "description": "Sample for GetClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.get_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.ServerTlsPolicy", + "shortName": "get_server_tls_policy" + }, + "description": "Sample for GetServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_get_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.get_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.GetServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.GetServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.types.ServerTlsPolicy", + "shortName": "get_server_tls_policy" + }, + "description": "Sample for GetServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_get_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.list_authorization_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListAuthorizationPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListAuthorizationPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListAuthorizationPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListAuthorizationPoliciesAsyncPager", + "shortName": "list_authorization_policies" + }, + "description": "Sample for ListAuthorizationPolicies", + "file": "networksecurity_v1_generated_network_security_list_authorization_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_authorization_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.list_authorization_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListAuthorizationPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListAuthorizationPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListAuthorizationPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListAuthorizationPoliciesPager", + "shortName": "list_authorization_policies" + }, + "description": "Sample for ListAuthorizationPolicies", + "file": "networksecurity_v1_generated_network_security_list_authorization_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_authorization_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.list_client_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListClientTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListClientTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListClientTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListClientTlsPoliciesAsyncPager", + "shortName": "list_client_tls_policies" + }, + "description": "Sample for ListClientTlsPolicies", + "file": "networksecurity_v1_generated_network_security_list_client_tls_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_client_tls_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.list_client_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListClientTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListClientTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListClientTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListClientTlsPoliciesPager", + "shortName": "list_client_tls_policies" + }, + "description": "Sample for ListClientTlsPolicies", + "file": "networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_client_tls_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.list_server_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListServerTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListServerTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListServerTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListServerTlsPoliciesAsyncPager", + "shortName": "list_server_tls_policies" + }, + "description": "Sample for ListServerTlsPolicies", + "file": "networksecurity_v1_generated_network_security_list_server_tls_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_server_tls_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.list_server_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.ListServerTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListServerTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.ListServerTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1.services.network_security.pagers.ListServerTlsPoliciesPager", + "shortName": "list_server_tls_policies" + }, + "description": "Sample for ListServerTlsPolicies", + "file": "networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_list_server_tls_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.update_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateAuthorizationPolicyRequest" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1.types.AuthorizationPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_authorization_policy" + }, + "description": "Sample for UpdateAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_update_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.update_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateAuthorizationPolicyRequest" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1.types.AuthorizationPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_authorization_policy" + }, + "description": "Sample for UpdateAuthorizationPolicy", + "file": "networksecurity_v1_generated_network_security_update_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.update_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateClientTlsPolicyRequest" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1.types.ClientTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_client_tls_policy" + }, + "description": "Sample for UpdateClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_update_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.update_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateClientTlsPolicyRequest" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1.types.ClientTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_client_tls_policy" + }, + "description": "Sample for UpdateClientTlsPolicy", + "file": "networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityAsyncClient.update_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateServerTlsPolicyRequest" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1.types.ServerTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_server_tls_policy" + }, + "description": "Sample for UpdateServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_update_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1.NetworkSecurityClient.update_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity.UpdateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1.types.UpdateServerTlsPolicyRequest" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1.types.ServerTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_server_tls_policy" + }, + "description": "Sample for UpdateServerTlsPolicy", + "file": "networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1_generated_network_security_update_server_tls_policy_sync.py" + } + ] +} diff --git a/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1beta1.json new file mode 100644 index 000000000000..fd7e421ca0d6 --- /dev/null +++ b/packages/google-cloud-network-security/samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1beta1.json @@ -0,0 +1,2502 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.networksecurity.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-network-security", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.create_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateAuthorizationPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy" + }, + { + "name": "authorization_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_authorization_policy" + }, + "description": "Sample for CreateAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.create_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateAuthorizationPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy" + }, + { + "name": "authorization_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_authorization_policy" + }, + "description": "Sample for CreateAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.create_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateClientTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy" + }, + { + "name": "client_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_client_tls_policy" + }, + "description": "Sample for CreateClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.create_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateClientTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy" + }, + { + "name": "client_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_client_tls_policy" + }, + "description": "Sample for CreateClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateClientTlsPolicy_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.create_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateServerTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy" + }, + { + "name": "server_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_server_tls_policy" + }, + "description": "Sample for CreateServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.create_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "CreateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.CreateServerTlsPolicyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy" + }, + { + "name": "server_tls_policy_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_server_tls_policy" + }, + "description": "Sample for CreateServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_CreateServerTlsPolicy_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_create_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.delete_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_authorization_policy" + }, + "description": "Sample for DeleteAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.delete_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_authorization_policy" + }, + "description": "Sample for DeleteAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.delete_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_client_tls_policy" + }, + "description": "Sample for DeleteClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.delete_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_client_tls_policy" + }, + "description": "Sample for DeleteClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.delete_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_server_tls_policy" + }, + "description": "Sample for DeleteServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.delete_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "DeleteServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.DeleteServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_server_tls_policy" + }, + "description": "Sample for DeleteServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_delete_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.get_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy", + "shortName": "get_authorization_policy" + }, + "description": "Sample for GetAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.get_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetAuthorizationPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy", + "shortName": "get_authorization_policy" + }, + "description": "Sample for GetAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetAuthorizationPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.get_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy", + "shortName": "get_client_tls_policy" + }, + "description": "Sample for GetClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.get_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetClientTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy", + "shortName": "get_client_tls_policy" + }, + "description": "Sample for GetClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetClientTlsPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.get_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy", + "shortName": "get_server_tls_policy" + }, + "description": "Sample for GetServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.get_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.GetServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "GetServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.GetServerTlsPolicyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy", + "shortName": "get_server_tls_policy" + }, + "description": "Sample for GetServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_GetServerTlsPolicy_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_get_server_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.list_authorization_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListAuthorizationPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListAuthorizationPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListAuthorizationPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListAuthorizationPoliciesAsyncPager", + "shortName": "list_authorization_policies" + }, + "description": "Sample for ListAuthorizationPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_authorization_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.list_authorization_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListAuthorizationPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListAuthorizationPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListAuthorizationPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListAuthorizationPoliciesPager", + "shortName": "list_authorization_policies" + }, + "description": "Sample for ListAuthorizationPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListAuthorizationPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_authorization_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.list_client_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListClientTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListClientTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListClientTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListClientTlsPoliciesAsyncPager", + "shortName": "list_client_tls_policies" + }, + "description": "Sample for ListClientTlsPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_client_tls_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.list_client_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListClientTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListClientTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListClientTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListClientTlsPoliciesPager", + "shortName": "list_client_tls_policies" + }, + "description": "Sample for ListClientTlsPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListClientTlsPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_client_tls_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.list_server_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListServerTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListServerTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListServerTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListServerTlsPoliciesAsyncPager", + "shortName": "list_server_tls_policies" + }, + "description": "Sample for ListServerTlsPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_server_tls_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.list_server_tls_policies", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.ListServerTlsPolicies", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "ListServerTlsPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.ListServerTlsPoliciesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.network_security_v1beta1.services.network_security.pagers.ListServerTlsPoliciesPager", + "shortName": "list_server_tls_policies" + }, + "description": "Sample for ListServerTlsPolicies", + "file": "networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_ListServerTlsPolicies_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_list_server_tls_policies_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.update_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateAuthorizationPolicyRequest" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_authorization_policy" + }, + "description": "Sample for UpdateAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_authorization_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.update_authorization_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateAuthorizationPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateAuthorizationPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateAuthorizationPolicyRequest" + }, + { + "name": "authorization_policy", + "type": "google.cloud.network_security_v1beta1.types.AuthorizationPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_authorization_policy" + }, + "description": "Sample for UpdateAuthorizationPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_authorization_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.update_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateClientTlsPolicyRequest" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_client_tls_policy" + }, + "description": "Sample for UpdateClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_client_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.update_client_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateClientTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateClientTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateClientTlsPolicyRequest" + }, + { + "name": "client_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ClientTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_client_tls_policy" + }, + "description": "Sample for UpdateClientTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_client_tls_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient", + "shortName": "NetworkSecurityAsyncClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityAsyncClient.update_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateServerTlsPolicyRequest" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_server_tls_policy" + }, + "description": "Sample for UpdateServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_server_tls_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient", + "shortName": "NetworkSecurityClient" + }, + "fullName": "google.cloud.network_security_v1beta1.NetworkSecurityClient.update_server_tls_policy", + "method": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateServerTlsPolicy", + "service": { + "fullName": "google.cloud.networksecurity.v1beta1.NetworkSecurity", + "shortName": "NetworkSecurity" + }, + "shortName": "UpdateServerTlsPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.network_security_v1beta1.types.UpdateServerTlsPolicyRequest" + }, + { + "name": "server_tls_policy", + "type": "google.cloud.network_security_v1beta1.types.ServerTlsPolicy" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_server_tls_policy" + }, + "description": "Sample for UpdateServerTlsPolicy", + "file": "networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "networksecurity_v1beta1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "networksecurity_v1beta1_generated_network_security_update_server_tls_policy_sync.py" + } + ] +} diff --git a/packages/google-cloud-network-security/setup.py b/packages/google-cloud-network-security/setup.py index 0c46b980f253..1ccf7361cf2f 100644 --- a/packages/google-cloud-network-security/setup.py +++ b/packages/google-cloud-network-security/setup.py @@ -42,7 +42,7 @@ "proto-plus >= 1.22.0, <2.0.0dev", "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - "grpc-google-iam-v1 >=0.12.4, <1.0.0dev", + "grpc-google-iam-v1 >= 0.12.4, <1.0.0dev", ] url = "https://github.com/googleapis/google-cloud-python" @@ -58,9 +58,7 @@ if package.startswith("google") ] -namespaces = ["google"] -if "google.cloud" in packages: - namespaces.append("google.cloud") +namespaces = ["google", "google.cloud"] setuptools.setup( name=name, diff --git a/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1/test_network_security.py b/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1/test_network_security.py index f013413715b6..d9f67fca3e6f 100644 --- a/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1/test_network_security.py +++ b/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1/test_network_security.py @@ -1195,9 +1195,11 @@ async def test_list_authorization_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_authorization_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2662,9 +2664,11 @@ async def test_list_server_tls_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_server_tls_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4113,9 +4117,11 @@ async def test_list_client_tls_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_client_tls_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1beta1/test_network_security.py b/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1beta1/test_network_security.py index db322e0374c5..9bc2a539f47b 100644 --- a/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1beta1/test_network_security.py +++ b/packages/google-cloud-network-security/tests/unit/gapic/network_security_v1beta1/test_network_security.py @@ -1163,9 +1163,11 @@ async def test_list_authorization_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_authorization_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2630,9 +2632,11 @@ async def test_list_server_tls_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_server_tls_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4081,9 +4085,11 @@ async def test_list_client_tls_policies_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_client_tls_policies(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks/gapic_version.py b/packages/google-cloud-notebooks/google/cloud/notebooks/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks/gapic_version.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/gapic_version.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/gapic_version.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py index d327a29682b1..2eac6af270fe 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/managed_notebook_service/async_client.py @@ -2449,7 +2449,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ManagedNotebookServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/notebook_service/async_client.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/notebook_service/async_client.py index 6dc15edd8e1e..1ac9d209a5c7 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/notebook_service/async_client.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1/services/notebook_service/async_client.py @@ -4539,7 +4539,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "NotebookServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/gapic_version.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/gapic_version.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py index 90af358b8102..a4bf4b5299f9 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/async_client.py @@ -2669,7 +2669,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "NotebookServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/transports/rest.py b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/transports/rest.py index b41d7adc5f49..78540586a5d0 100644 --- a/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/transports/rest.py +++ b/packages/google-cloud-notebooks/google/cloud/notebooks_v1beta1/services/notebook_service/transports/rest.py @@ -3210,7 +3210,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -3282,7 +3282,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -3351,7 +3351,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-notebooks/noxfile.py b/packages/google-cloud-notebooks/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-notebooks/noxfile.py +++ b/packages/google-cloud-notebooks/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_async.py new file mode 100644 index 000000000000..2ed8514450ef --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_CreateRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_CreateRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py new file mode 100644 index 000000000000..81ae72841dbc --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_CreateRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_CreateRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py new file mode 100644 index 000000000000..f921e610b293 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_DeleteRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_DeleteRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py new file mode 100644 index 000000000000..6710bfd817f1 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_DeleteRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_DeleteRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py new file mode 100644 index 000000000000..e87fcf5796c5 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiagnoseRuntime +# 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_v1_generated_ManagedNotebookService_DiagnoseRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_diagnose_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + diagnostic_config = notebooks_v1.DiagnosticConfig() + diagnostic_config.gcs_bucket = "gcs_bucket_value" + + request = notebooks_v1.DiagnoseRuntimeRequest( + name="name_value", + diagnostic_config=diagnostic_config, + ) + + # Make the request + operation = client.diagnose_runtime(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py new file mode 100644 index 000000000000..e55f5e880cdf --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiagnoseRuntime +# 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_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_diagnose_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + diagnostic_config = notebooks_v1.DiagnosticConfig() + diagnostic_config.gcs_bucket = "gcs_bucket_value" + + request = notebooks_v1.DiagnoseRuntimeRequest( + name="name_value", + diagnostic_config=diagnostic_config, + ) + + # Make the request + operation = client.diagnose_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_async.py new file mode 100644 index 000000000000..d6d04df24776 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_GetRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_GetRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py new file mode 100644 index 000000000000..d2823f068c3b --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_GetRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_GetRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py new file mode 100644 index 000000000000..66d6948235f6 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ListRuntimes_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ListRuntimes_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py new file mode 100644 index 000000000000..018cf4dc9631 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ListRuntimes_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ListRuntimes_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py new file mode 100644 index 000000000000..3be68df87f08 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RefreshRuntimeTokenInternal +# 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_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_refresh_runtime_token_internal(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.RefreshRuntimeTokenInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + response = await client.refresh_runtime_token_internal(request=request) + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py new file mode 100644 index 000000000000..384732b59627 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RefreshRuntimeTokenInternal +# 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_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_refresh_runtime_token_internal(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.RefreshRuntimeTokenInternalRequest( + name="name_value", + vm_id="vm_id_value", + ) + + # Make the request + response = client.refresh_runtime_token_internal(request=request) + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py new file mode 100644 index 000000000000..b072b5ad7dd0 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ReportRuntimeEvent_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ReportRuntimeEvent_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py new file mode 100644 index 000000000000..7e305b75d0c5 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ReportRuntimeEvent_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ReportRuntimeEvent_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py new file mode 100644 index 000000000000..53bfec2a5079 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ResetRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ResetRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py new file mode 100644 index 000000000000..044fcbca8989 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_ResetRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_ResetRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_async.py new file mode 100644 index 000000000000..d774562f8b79 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_StartRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_StartRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py new file mode 100644 index 000000000000..2bd8db7a0eb3 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_StartRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_StartRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py new file mode 100644 index 000000000000..1550b9ac461f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_StopRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_StopRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py new file mode 100644 index 000000000000..7d07c3937bcc --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_StopRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_StopRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py new file mode 100644 index 000000000000..0287bf8ae5fd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_SwitchRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_SwitchRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py new file mode 100644 index 000000000000..21180cd2f71c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_ManagedNotebookService_SwitchRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_ManagedNotebookService_SwitchRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_async.py new file mode 100644 index 000000000000..15c36f3b4228 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRuntime +# 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_v1_generated_ManagedNotebookService_UpdateRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_update_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateRuntimeRequest( + ) + + # Make the request + operation = client.update_runtime(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py new file mode 100644 index 000000000000..579b661556ad --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRuntime +# 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_v1_generated_ManagedNotebookService_UpdateRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_update_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateRuntimeRequest( + ) + + # Make the request + operation = client.update_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py new file mode 100644 index 000000000000..632ff903ac6a --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpgradeRuntime +# 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_v1_generated_ManagedNotebookService_UpgradeRuntime_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_upgrade_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_runtime(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py new file mode 100644 index 000000000000..c3a205c5158f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpgradeRuntime +# 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_v1_generated_ManagedNotebookService_UpgradeRuntime_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_upgrade_runtime(): + # Create a client + client = notebooks_v1.ManagedNotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpgradeRuntimeRequest( + name="name_value", + ) + + # Make the request + operation = client.upgrade_runtime(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_async.py new file mode 100644 index 000000000000..3d2621585edb --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_sync.py new file mode 100644 index 000000000000..3a4bbc7b4a90 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_environment_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_async.py new file mode 100644 index 000000000000..58b282836be2 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateExecution_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateExecution_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_sync.py new file mode 100644 index 000000000000..a59beec1595c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_execution_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateExecution_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateExecution_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_async.py new file mode 100644 index 000000000000..58f5bb3e43de --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_sync.py new file mode 100644 index 000000000000..e2b46b4c3e6f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_instance_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_async.py new file mode 100644 index 000000000000..06c21e341934 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateSchedule_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateSchedule_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_sync.py new file mode 100644 index 000000000000..18e95a240d75 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_create_schedule_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_CreateSchedule_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_CreateSchedule_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_async.py new file mode 100644 index 000000000000..341390b27272 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_sync.py new file mode 100644 index 000000000000..ee2c76dd587a --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_environment_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_async.py new file mode 100644 index 000000000000..21d2209e4039 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteExecution_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteExecution_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_sync.py new file mode 100644 index 000000000000..83087d99f5ce --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_execution_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteExecution_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteExecution_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_async.py new file mode 100644 index 000000000000..0aeac29c9e32 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_sync.py new file mode 100644 index 000000000000..46c6ac559f7c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_async.py new file mode 100644 index 000000000000..ee1648668bd6 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteSchedule_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteSchedule_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_sync.py new file mode 100644 index 000000000000..4dd5ce319df3 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_delete_schedule_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_DeleteSchedule_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_DeleteSchedule_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_async.py new file mode 100644 index 000000000000..2dfce0adb36f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiagnoseInstance +# 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_v1_generated_NotebookService_DiagnoseInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_diagnose_instance(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + diagnostic_config = notebooks_v1.DiagnosticConfig() + diagnostic_config.gcs_bucket = "gcs_bucket_value" + + request = notebooks_v1.DiagnoseInstanceRequest( + name="name_value", + diagnostic_config=diagnostic_config, + ) + + # Make the request + operation = client.diagnose_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_NotebookService_DiagnoseInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_sync.py new file mode 100644 index 000000000000..d76197b09f6c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_diagnose_instance_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiagnoseInstance +# 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_v1_generated_NotebookService_DiagnoseInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_diagnose_instance(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + diagnostic_config = notebooks_v1.DiagnosticConfig() + diagnostic_config.gcs_bucket = "gcs_bucket_value" + + request = notebooks_v1.DiagnoseInstanceRequest( + name="name_value", + diagnostic_config=diagnostic_config, + ) + + # Make the request + operation = client.diagnose_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END notebooks_v1_generated_NotebookService_DiagnoseInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_async.py new file mode 100644 index 000000000000..1644f60181c0 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_sync.py new file mode 100644 index 000000000000..7d395be6e20d --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_environment_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_async.py new file mode 100644 index 000000000000..370609582297 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetExecution_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetExecution_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_sync.py new file mode 100644 index 000000000000..79c8a35522fa --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_execution_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetExecution_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetExecution_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_async.py new file mode 100644 index 000000000000..2066da014c02 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_async.py new file mode 100644 index 000000000000..eb9d12a8fbbc --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetInstanceHealth_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetInstanceHealth_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_sync.py new file mode 100644 index 000000000000..dea04d95e098 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_health_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetInstanceHealth_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetInstanceHealth_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_sync.py new file mode 100644 index 000000000000..887845e3b884 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_async.py new file mode 100644 index 000000000000..140169b1c097 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetSchedule_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetSchedule_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_sync.py new file mode 100644 index 000000000000..ac6b2caf9096 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_get_schedule_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_GetSchedule_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_GetSchedule_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py new file mode 100644 index 000000000000..cd8f7342b264 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_IsInstanceUpgradeable_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_IsInstanceUpgradeable_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py new file mode 100644 index 000000000000..fed513e4abd0 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_IsInstanceUpgradeable_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_IsInstanceUpgradeable_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_async.py new file mode 100644 index 000000000000..6618d5838fe3 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListEnvironments_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListEnvironments_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_sync.py new file mode 100644 index 000000000000..b15c212f8e8b --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_environments_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListEnvironments_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListEnvironments_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_async.py new file mode 100644 index 000000000000..bcf4f3cabd7f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListExecutions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListExecutions_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_sync.py new file mode 100644 index 000000000000..1a84b65d36dd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_executions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListExecutions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListExecutions_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_async.py new file mode 100644 index 000000000000..c72898b8c583 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListInstances_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListInstances_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_sync.py new file mode 100644 index 000000000000..56fb1518df7c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_instances_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListInstances_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_async.py new file mode 100644 index 000000000000..0f6dac4912d4 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListSchedules_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListSchedules_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_sync.py new file mode 100644 index 000000000000..0855d55e82cc --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_list_schedules_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ListSchedules_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ListSchedules_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_async.py new file mode 100644 index 000000000000..401cc5070d94 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_RegisterInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_RegisterInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_sync.py new file mode 100644 index 000000000000..c037df773ffd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_register_instance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_RegisterInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_RegisterInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_async.py new file mode 100644 index 000000000000..11e07dd855ca --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ReportInstanceInfo_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ReportInstanceInfo_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_sync.py new file mode 100644 index 000000000000..13455ad43a65 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_report_instance_info_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ReportInstanceInfo_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ReportInstanceInfo_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_async.py new file mode 100644 index 000000000000..eebb0f3db1c0 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ResetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ResetInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_sync.py new file mode 100644 index 000000000000..e81ab1fa643c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_reset_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_ResetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_ResetInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_async.py new file mode 100644 index 000000000000..9467bbe7c61b --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_RollbackInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_RollbackInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_sync.py new file mode 100644 index 000000000000..46f3f94df300 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_rollback_instance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_RollbackInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_RollbackInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py new file mode 100644 index 000000000000..029b839f16ab --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceAccelerator_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceAccelerator_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py new file mode 100644 index 000000000000..4bb9c2591bc3 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceAccelerator_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceAccelerator_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_async.py new file mode 100644 index 000000000000..443aef7d201d --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceLabels_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceLabels_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_sync.py new file mode 100644 index 000000000000..8f7490227e2c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_labels_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceLabels_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceLabels_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py new file mode 100644 index 000000000000..c42bf7cc2bf1 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceMachineType_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceMachineType_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py new file mode 100644 index 000000000000..d88481f2ba85 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_SetInstanceMachineType_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_SetInstanceMachineType_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_async.py new file mode 100644 index 000000000000..132aa7e748dd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_StartInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_StartInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_sync.py new file mode 100644 index 000000000000..8e246f3f457d --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_start_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_StartInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_StartInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_async.py new file mode 100644 index 000000000000..38d1a18e02e6 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_StopInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_StopInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_sync.py new file mode 100644 index 000000000000..770ba66f02c2 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_stop_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_StopInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_StopInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_async.py new file mode 100644 index 000000000000..fbd0d6d2b0a6 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_TriggerSchedule_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_TriggerSchedule_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_sync.py new file mode 100644 index 000000000000..2bba801af468 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_trigger_schedule_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_TriggerSchedule_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_TriggerSchedule_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_async.py new file mode 100644 index 000000000000..d742189a75cc --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpdateInstanceConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpdateInstanceConfig_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_sync.py new file mode 100644 index 000000000000..a550901110a4 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_config_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpdateInstanceConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpdateInstanceConfig_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py new file mode 100644 index 000000000000..1c0f1bc4396a --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstanceMetadataItems +# 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_v1_generated_NotebookService_UpdateInstanceMetadataItems_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +async def sample_update_instance_metadata_items(): + # Create a client + client = notebooks_v1.NotebookServiceAsyncClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceMetadataItemsRequest( + name="name_value", + ) + + # Make the request + response = await client.update_instance_metadata_items(request=request) + + # Handle the response + print(response) + +# [END notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py new file mode 100644 index 000000000000..761d5ead76cd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstanceMetadataItems +# 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_v1_generated_NotebookService_UpdateInstanceMetadataItems_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import notebooks_v1 + + +def sample_update_instance_metadata_items(): + # Create a client + client = notebooks_v1.NotebookServiceClient() + + # Initialize request argument(s) + request = notebooks_v1.UpdateInstanceMetadataItemsRequest( + name="name_value", + ) + + # Make the request + response = client.update_instance_metadata_items(request=request) + + # Handle the response + print(response) + +# [END notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py new file mode 100644 index 000000000000..02e08e8e4784 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpdateShieldedInstanceConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpdateShieldedInstanceConfig_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py new file mode 100644 index 000000000000..1ae238f6dfdb --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpdateShieldedInstanceConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpdateShieldedInstanceConfig_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_async.py new file mode 100644 index 000000000000..c887bccf5756 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpgradeInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpgradeInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py new file mode 100644 index 000000000000..216696635761 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpgradeInstanceInternal_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpgradeInstanceInternal_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py new file mode 100644 index 000000000000..2290d7ef9d64 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpgradeInstanceInternal_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpgradeInstanceInternal_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_sync.py new file mode 100644 index 000000000000..7c21f2cf9977 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1_generated_notebook_service_upgrade_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1_generated_NotebookService_UpgradeInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1_generated_NotebookService_UpgradeInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_async.py new file mode 100644 index 000000000000..0e5bb5f4b960 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_CreateEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_CreateEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_sync.py new file mode 100644 index 000000000000..ac1f30a690b3 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_environment_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_CreateEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_CreateEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_async.py new file mode 100644 index 000000000000..1c751b014a48 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_CreateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_CreateInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_sync.py new file mode 100644 index 000000000000..0d08bfc190c5 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_create_instance_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_CreateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_CreateInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_async.py new file mode 100644 index 000000000000..5c07fa3a7e77 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_DeleteEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_DeleteEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py new file mode 100644 index 000000000000..9f06f69a64c8 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_DeleteEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_DeleteEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_async.py new file mode 100644 index 000000000000..37e3f2d8db74 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_DeleteInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_DeleteInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py new file mode 100644 index 000000000000..2b06aa9088fb --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_DeleteInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_DeleteInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_async.py new file mode 100644 index 000000000000..faeb9af0d928 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_GetEnvironment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_GetEnvironment_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_sync.py new file mode 100644 index 000000000000..37192dffbc55 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_environment_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_GetEnvironment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_GetEnvironment_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_async.py new file mode 100644 index 000000000000..48ce3edff830 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_GetInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_sync.py new file mode 100644 index 000000000000..11426d0f51fd --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_GetInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py new file mode 100644 index 000000000000..7c837a3b3d0e --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_IsInstanceUpgradeable_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_IsInstanceUpgradeable_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py new file mode 100644 index 000000000000..aaed244a40db --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_IsInstanceUpgradeable_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_IsInstanceUpgradeable_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_async.py new file mode 100644 index 000000000000..f38153d865b8 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ListEnvironments_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ListEnvironments_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_sync.py new file mode 100644 index 000000000000..8bb5be542c6d --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_environments_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ListEnvironments_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ListEnvironments_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_async.py new file mode 100644 index 000000000000..9eaae0879327 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ListInstances_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ListInstances_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_sync.py new file mode 100644 index 000000000000..6a52de715c6c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_list_instances_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ListInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ListInstances_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_async.py new file mode 100644 index 000000000000..22da33389f8e --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_RegisterInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_RegisterInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_sync.py new file mode 100644 index 000000000000..0d6c49eb9647 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_register_instance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_RegisterInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_RegisterInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py new file mode 100644 index 000000000000..0318ce7c9ee2 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ReportInstanceInfo_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ReportInstanceInfo_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py new file mode 100644 index 000000000000..7786ac57fcd6 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ReportInstanceInfo_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ReportInstanceInfo_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_async.py new file mode 100644 index 000000000000..ddcc16ef1594 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ResetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ResetInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py new file mode 100644 index 000000000000..e53a772ae7aa --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_ResetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_ResetInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py new file mode 100644 index 000000000000..8f348f5864c5 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceAccelerator_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceAccelerator_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py new file mode 100644 index 000000000000..fc1a3bd625cf --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceAccelerator_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceAccelerator_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py new file mode 100644 index 000000000000..e44e36ea7766 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceLabels_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceLabels_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py new file mode 100644 index 000000000000..c762a4b05536 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceLabels_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceLabels_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py new file mode 100644 index 000000000000..8d84ba5e5d0c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceMachineType_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceMachineType_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py new file mode 100644 index 000000000000..02eadcb5c987 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_SetInstanceMachineType_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_SetInstanceMachineType_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_async.py new file mode 100644 index 000000000000..0d1aded2e90b --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_StartInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_StartInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_sync.py new file mode 100644 index 000000000000..c2d10dc74cd2 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_start_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_StartInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_StartInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_async.py new file mode 100644 index 000000000000..46a8d609cf5d --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_StopInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_StopInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py new file mode 100644 index 000000000000..355fc2824669 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_StopInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_StopInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py new file mode 100644 index 000000000000..385ab00c2f7b --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_UpgradeInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_UpgradeInstance_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py new file mode 100644 index 000000000000..104247d8a11c --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_UpgradeInstanceInternal_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_UpgradeInstanceInternal_async] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py new file mode 100644 index 000000000000..dd6b57d5d466 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_UpgradeInstanceInternal_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_UpgradeInstanceInternal_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py new file mode 100644 index 000000000000..79a7413204f7 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_v1beta1_generated_NotebookService_UpgradeInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +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_v1beta1_generated_NotebookService_UpgradeInstance_sync] diff --git a/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1.json b/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1.json new file mode 100644 index 000000000000..1e5dcb8dbe89 --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1.json @@ -0,0 +1,7566 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.notebooks.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-notebooks", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.create_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.CreateRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "CreateRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateRuntimeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "runtime_id", + "type": "str" + }, + { + "name": "runtime", + "type": "google.cloud.notebooks_v1.types.Runtime" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_runtime" + }, + "description": "Sample for CreateRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_create_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_CreateRuntime_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_create_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.create_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.CreateRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "CreateRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateRuntimeRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "runtime_id", + "type": "str" + }, + { + "name": "runtime", + "type": "google.cloud.notebooks_v1.types.Runtime" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_runtime" + }, + "description": "Sample for CreateRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_CreateRuntime_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_create_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.delete_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.DeleteRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "DeleteRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_runtime" + }, + "description": "Sample for DeleteRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_DeleteRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_delete_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.delete_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.DeleteRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "DeleteRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_runtime" + }, + "description": "Sample for DeleteRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_DeleteRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_delete_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.diagnose_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.DiagnoseRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "DiagnoseRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DiagnoseRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "diagnostic_config", + "type": "google.cloud.notebooks_v1.types.DiagnosticConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "diagnose_runtime" + }, + "description": "Sample for DiagnoseRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_diagnose_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.diagnose_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.DiagnoseRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "DiagnoseRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DiagnoseRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "diagnostic_config", + "type": "google.cloud.notebooks_v1.types.DiagnosticConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "diagnose_runtime" + }, + "description": "Sample for DiagnoseRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_diagnose_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.get_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.GetRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "GetRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Runtime", + "shortName": "get_runtime" + }, + "description": "Sample for GetRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_get_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_GetRuntime_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_get_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.get_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.GetRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "GetRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Runtime", + "shortName": "get_runtime" + }, + "description": "Sample for GetRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_GetRuntime_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_get_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.list_runtimes", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ListRuntimes", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ListRuntimes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListRuntimesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.managed_notebook_service.pagers.ListRuntimesAsyncPager", + "shortName": "list_runtimes" + }, + "description": "Sample for ListRuntimes", + "file": "notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ListRuntimes_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_list_runtimes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.list_runtimes", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ListRuntimes", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ListRuntimes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListRuntimesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.managed_notebook_service.pagers.ListRuntimesPager", + "shortName": "list_runtimes" + }, + "description": "Sample for ListRuntimes", + "file": "notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ListRuntimes_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_list_runtimes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.refresh_runtime_token_internal", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.RefreshRuntimeTokenInternal", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "RefreshRuntimeTokenInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "vm_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalResponse", + "shortName": "refresh_runtime_token_internal" + }, + "description": "Sample for RefreshRuntimeTokenInternal", + "file": "notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.refresh_runtime_token_internal", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.RefreshRuntimeTokenInternal", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "RefreshRuntimeTokenInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "vm_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalResponse", + "shortName": "refresh_runtime_token_internal" + }, + "description": "Sample for RefreshRuntimeTokenInternal", + "file": "notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_refresh_runtime_token_internal_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.report_runtime_event", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ReportRuntimeEvent", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ReportRuntimeEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ReportRuntimeEventRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "report_runtime_event" + }, + "description": "Sample for ReportRuntimeEvent", + "file": "notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ReportRuntimeEvent_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_report_runtime_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.report_runtime_event", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ReportRuntimeEvent", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ReportRuntimeEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ReportRuntimeEventRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "report_runtime_event" + }, + "description": "Sample for ReportRuntimeEvent", + "file": "notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ReportRuntimeEvent_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_report_runtime_event_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.reset_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ResetRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ResetRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ResetRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reset_runtime" + }, + "description": "Sample for ResetRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ResetRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_reset_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.reset_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.ResetRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "ResetRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ResetRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reset_runtime" + }, + "description": "Sample for ResetRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_ResetRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_reset_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.start_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.StartRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "StartRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StartRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_runtime" + }, + "description": "Sample for StartRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_start_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_StartRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_start_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.start_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.StartRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "StartRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StartRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_runtime" + }, + "description": "Sample for StartRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_StartRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_start_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.stop_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.StopRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "StopRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StopRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "stop_runtime" + }, + "description": "Sample for StopRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_StopRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_stop_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.stop_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.StopRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "StopRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StopRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "stop_runtime" + }, + "description": "Sample for StopRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_StopRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_stop_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.switch_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.SwitchRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "SwitchRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SwitchRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "switch_runtime" + }, + "description": "Sample for SwitchRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_SwitchRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_switch_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.switch_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.SwitchRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "SwitchRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SwitchRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "switch_runtime" + }, + "description": "Sample for SwitchRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_SwitchRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_switch_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.update_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.UpdateRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "UpdateRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateRuntimeRequest" + }, + { + "name": "runtime", + "type": "google.cloud.notebooks_v1.types.Runtime" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_runtime" + }, + "description": "Sample for UpdateRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_update_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_update_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.update_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.UpdateRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "UpdateRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateRuntimeRequest" + }, + { + "name": "runtime", + "type": "google.cloud.notebooks_v1.types.Runtime" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_runtime" + }, + "description": "Sample for UpdateRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_update_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient", + "shortName": "ManagedNotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceAsyncClient.upgrade_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.UpgradeRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "UpgradeRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_runtime" + }, + "description": "Sample for UpgradeRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_upgrade_runtime_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient", + "shortName": "ManagedNotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.ManagedNotebookServiceClient.upgrade_runtime", + "method": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService.UpgradeRuntime", + "service": { + "fullName": "google.cloud.notebooks.v1.ManagedNotebookService", + "shortName": "ManagedNotebookService" + }, + "shortName": "UpgradeRuntime" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeRuntimeRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_runtime" + }, + "description": "Sample for UpgradeRuntime", + "file": "notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_managed_notebook_service_upgrade_runtime_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.create_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateEnvironmentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "environment", + "type": "google.cloud.notebooks_v1.types.Environment" + }, + { + "name": "environment_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_environment" + }, + "description": "Sample for CreateEnvironment", + "file": "notebooks_v1_generated_notebook_service_create_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateEnvironment_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.create_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateEnvironmentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "environment", + "type": "google.cloud.notebooks_v1.types.Environment" + }, + { + "name": "environment_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_environment" + }, + "description": "Sample for CreateEnvironment", + "file": "notebooks_v1_generated_notebook_service_create_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateEnvironment_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.create_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateExecutionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "execution", + "type": "google.cloud.notebooks_v1.types.Execution" + }, + { + "name": "execution_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_execution" + }, + "description": "Sample for CreateExecution", + "file": "notebooks_v1_generated_notebook_service_create_execution_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateExecution_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_execution_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.create_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateExecutionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "execution", + "type": "google.cloud.notebooks_v1.types.Execution" + }, + { + "name": "execution_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_execution" + }, + "description": "Sample for CreateExecution", + "file": "notebooks_v1_generated_notebook_service_create_execution_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateExecution_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_execution_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.notebooks_v1.types.Instance" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "notebooks_v1_generated_notebook_service_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateInstance_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.create_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.notebooks_v1.types.Instance" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "notebooks_v1_generated_notebook_service_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateInstance_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.create_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateScheduleRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "schedule", + "type": "google.cloud.notebooks_v1.types.Schedule" + }, + { + "name": "schedule_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_schedule" + }, + "description": "Sample for CreateSchedule", + "file": "notebooks_v1_generated_notebook_service_create_schedule_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateSchedule_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_schedule_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.create_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.CreateSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.CreateScheduleRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "schedule", + "type": "google.cloud.notebooks_v1.types.Schedule" + }, + { + "name": "schedule_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_schedule" + }, + "description": "Sample for CreateSchedule", + "file": "notebooks_v1_generated_notebook_service_create_schedule_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_CreateSchedule_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_create_schedule_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.delete_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteEnvironmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_environment" + }, + "description": "Sample for DeleteEnvironment", + "file": "notebooks_v1_generated_notebook_service_delete_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteEnvironment_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.delete_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteEnvironmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_environment" + }, + "description": "Sample for DeleteEnvironment", + "file": "notebooks_v1_generated_notebook_service_delete_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteEnvironment_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.delete_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteExecutionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_execution" + }, + "description": "Sample for DeleteExecution", + "file": "notebooks_v1_generated_notebook_service_delete_execution_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteExecution_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_execution_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.delete_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteExecutionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_execution" + }, + "description": "Sample for DeleteExecution", + "file": "notebooks_v1_generated_notebook_service_delete_execution_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteExecution_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_execution_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "notebooks_v1_generated_notebook_service_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.delete_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "notebooks_v1_generated_notebook_service_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.delete_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteScheduleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_schedule" + }, + "description": "Sample for DeleteSchedule", + "file": "notebooks_v1_generated_notebook_service_delete_schedule_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteSchedule_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_schedule_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.delete_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DeleteSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DeleteScheduleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_schedule" + }, + "description": "Sample for DeleteSchedule", + "file": "notebooks_v1_generated_notebook_service_delete_schedule_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DeleteSchedule_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_delete_schedule_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.diagnose_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DiagnoseInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DiagnoseInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DiagnoseInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "diagnostic_config", + "type": "google.cloud.notebooks_v1.types.DiagnosticConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "diagnose_instance" + }, + "description": "Sample for DiagnoseInstance", + "file": "notebooks_v1_generated_notebook_service_diagnose_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DiagnoseInstance_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_diagnose_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.diagnose_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.DiagnoseInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DiagnoseInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.DiagnoseInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "diagnostic_config", + "type": "google.cloud.notebooks_v1.types.DiagnosticConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "diagnose_instance" + }, + "description": "Sample for DiagnoseInstance", + "file": "notebooks_v1_generated_notebook_service_diagnose_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_DiagnoseInstance_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_diagnose_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.get_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetEnvironmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Environment", + "shortName": "get_environment" + }, + "description": "Sample for GetEnvironment", + "file": "notebooks_v1_generated_notebook_service_get_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetEnvironment_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.get_environment", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetEnvironmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Environment", + "shortName": "get_environment" + }, + "description": "Sample for GetEnvironment", + "file": "notebooks_v1_generated_notebook_service_get_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetEnvironment_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.get_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetExecutionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Execution", + "shortName": "get_execution" + }, + "description": "Sample for GetExecution", + "file": "notebooks_v1_generated_notebook_service_get_execution_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetExecution_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_execution_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.get_execution", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetExecution", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetExecution" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetExecutionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Execution", + "shortName": "get_execution" + }, + "description": "Sample for GetExecution", + "file": "notebooks_v1_generated_notebook_service_get_execution_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetExecution_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_execution_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.get_instance_health", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetInstanceHealth", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstanceHealth" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetInstanceHealthRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.GetInstanceHealthResponse", + "shortName": "get_instance_health" + }, + "description": "Sample for GetInstanceHealth", + "file": "notebooks_v1_generated_notebook_service_get_instance_health_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetInstanceHealth_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_instance_health_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.get_instance_health", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetInstanceHealth", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstanceHealth" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetInstanceHealthRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.GetInstanceHealthResponse", + "shortName": "get_instance_health" + }, + "description": "Sample for GetInstanceHealth", + "file": "notebooks_v1_generated_notebook_service_get_instance_health_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetInstanceHealth_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_instance_health_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "notebooks_v1_generated_notebook_service_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.get_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "notebooks_v1_generated_notebook_service_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.get_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetScheduleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Schedule", + "shortName": "get_schedule" + }, + "description": "Sample for GetSchedule", + "file": "notebooks_v1_generated_notebook_service_get_schedule_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetSchedule_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_schedule_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.get_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.GetSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.GetScheduleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.Schedule", + "shortName": "get_schedule" + }, + "description": "Sample for GetSchedule", + "file": "notebooks_v1_generated_notebook_service_get_schedule_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_GetSchedule_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_get_schedule_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.is_instance_upgradeable", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.IsInstanceUpgradeable", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.IsInstanceUpgradeableResponse", + "shortName": "is_instance_upgradeable" + }, + "description": "Sample for IsInstanceUpgradeable", + "file": "notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_IsInstanceUpgradeable_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_is_instance_upgradeable_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.is_instance_upgradeable", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.IsInstanceUpgradeable", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.IsInstanceUpgradeableResponse", + "shortName": "is_instance_upgradeable" + }, + "description": "Sample for IsInstanceUpgradeable", + "file": "notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_IsInstanceUpgradeable_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_is_instance_upgradeable_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.list_environments", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListEnvironments", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListEnvironments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListEnvironmentsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsAsyncPager", + "shortName": "list_environments" + }, + "description": "Sample for ListEnvironments", + "file": "notebooks_v1_generated_notebook_service_list_environments_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListEnvironments_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_environments_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.list_environments", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListEnvironments", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListEnvironments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListEnvironmentsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsPager", + "shortName": "list_environments" + }, + "description": "Sample for ListEnvironments", + "file": "notebooks_v1_generated_notebook_service_list_environments_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListEnvironments_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_environments_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.list_executions", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListExecutions", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListExecutions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListExecutionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsAsyncPager", + "shortName": "list_executions" + }, + "description": "Sample for ListExecutions", + "file": "notebooks_v1_generated_notebook_service_list_executions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListExecutions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_executions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.list_executions", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListExecutions", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListExecutions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListExecutionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsPager", + "shortName": "list_executions" + }, + "description": "Sample for ListExecutions", + "file": "notebooks_v1_generated_notebook_service_list_executions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListExecutions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_executions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListInstances", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "notebooks_v1_generated_notebook_service_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListInstances_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.list_instances", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListInstances", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "notebooks_v1_generated_notebook_service_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListInstances_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.list_schedules", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListSchedules", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListSchedules" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListSchedulesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesAsyncPager", + "shortName": "list_schedules" + }, + "description": "Sample for ListSchedules", + "file": "notebooks_v1_generated_notebook_service_list_schedules_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListSchedules_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_schedules_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.list_schedules", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ListSchedules", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListSchedules" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ListSchedulesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesPager", + "shortName": "list_schedules" + }, + "description": "Sample for ListSchedules", + "file": "notebooks_v1_generated_notebook_service_list_schedules_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ListSchedules_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_list_schedules_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.register_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.RegisterInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RegisterInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "register_instance" + }, + "description": "Sample for RegisterInstance", + "file": "notebooks_v1_generated_notebook_service_register_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_RegisterInstance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_register_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.register_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.RegisterInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RegisterInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "register_instance" + }, + "description": "Sample for RegisterInstance", + "file": "notebooks_v1_generated_notebook_service_register_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_RegisterInstance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_register_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.report_instance_info", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ReportInstanceInfo", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ReportInstanceInfoRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "report_instance_info" + }, + "description": "Sample for ReportInstanceInfo", + "file": "notebooks_v1_generated_notebook_service_report_instance_info_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ReportInstanceInfo_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_report_instance_info_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.report_instance_info", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ReportInstanceInfo", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ReportInstanceInfoRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "report_instance_info" + }, + "description": "Sample for ReportInstanceInfo", + "file": "notebooks_v1_generated_notebook_service_report_instance_info_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ReportInstanceInfo_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_report_instance_info_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.reset_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ResetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ResetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "notebooks_v1_generated_notebook_service_reset_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ResetInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_reset_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.reset_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.ResetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.ResetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "notebooks_v1_generated_notebook_service_reset_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_ResetInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_reset_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.rollback_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.RollbackInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RollbackInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RollbackInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "rollback_instance" + }, + "description": "Sample for RollbackInstance", + "file": "notebooks_v1_generated_notebook_service_rollback_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_RollbackInstance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_rollback_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.rollback_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.RollbackInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RollbackInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.RollbackInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "rollback_instance" + }, + "description": "Sample for RollbackInstance", + "file": "notebooks_v1_generated_notebook_service_rollback_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_RollbackInstance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_rollback_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.set_instance_accelerator", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceAccelerator", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_accelerator" + }, + "description": "Sample for SetInstanceAccelerator", + "file": "notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceAccelerator_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_accelerator_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.set_instance_accelerator", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceAccelerator", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_accelerator" + }, + "description": "Sample for SetInstanceAccelerator", + "file": "notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceAccelerator_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_accelerator_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.set_instance_labels", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceLabels", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceLabelsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_labels" + }, + "description": "Sample for SetInstanceLabels", + "file": "notebooks_v1_generated_notebook_service_set_instance_labels_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceLabels_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_labels_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.set_instance_labels", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceLabels", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceLabelsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_labels" + }, + "description": "Sample for SetInstanceLabels", + "file": "notebooks_v1_generated_notebook_service_set_instance_labels_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceLabels_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_labels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.set_instance_machine_type", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceMachineType", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_machine_type" + }, + "description": "Sample for SetInstanceMachineType", + "file": "notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceMachineType_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_machine_type_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.set_instance_machine_type", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.SetInstanceMachineType", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_machine_type" + }, + "description": "Sample for SetInstanceMachineType", + "file": "notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_SetInstanceMachineType_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_set_instance_machine_type_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.start_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.StartInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StartInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "notebooks_v1_generated_notebook_service_start_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_StartInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_start_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.start_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.StartInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StartInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "notebooks_v1_generated_notebook_service_start_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_StartInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_start_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.stop_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.StopInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StopInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "notebooks_v1_generated_notebook_service_stop_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_StopInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_stop_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.stop_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.StopInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.StopInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "notebooks_v1_generated_notebook_service_stop_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_StopInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_stop_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.trigger_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.TriggerSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "TriggerSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.TriggerScheduleRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "trigger_schedule" + }, + "description": "Sample for TriggerSchedule", + "file": "notebooks_v1_generated_notebook_service_trigger_schedule_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_TriggerSchedule_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_trigger_schedule_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.trigger_schedule", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.TriggerSchedule", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "TriggerSchedule" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.TriggerScheduleRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "trigger_schedule" + }, + "description": "Sample for TriggerSchedule", + "file": "notebooks_v1_generated_notebook_service_trigger_schedule_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_TriggerSchedule_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_trigger_schedule_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.update_instance_config", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateInstanceConfig", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_instance_config" + }, + "description": "Sample for UpdateInstanceConfig", + "file": "notebooks_v1_generated_notebook_service_update_instance_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateInstanceConfig_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_instance_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.update_instance_config", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateInstanceConfig", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_instance_config" + }, + "description": "Sample for UpdateInstanceConfig", + "file": "notebooks_v1_generated_notebook_service_update_instance_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateInstanceConfig_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_instance_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.update_instance_metadata_items", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateInstanceMetadataItems", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceMetadataItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsResponse", + "shortName": "update_instance_metadata_items" + }, + "description": "Sample for UpdateInstanceMetadataItems", + "file": "notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_instance_metadata_items_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.update_instance_metadata_items", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateInstanceMetadataItems", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateInstanceMetadataItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsResponse", + "shortName": "update_instance_metadata_items" + }, + "description": "Sample for UpdateInstanceMetadataItems", + "file": "notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_instance_metadata_items_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.update_shielded_instance_config", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateShieldedInstanceConfig", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateShieldedInstanceConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_shielded_instance_config" + }, + "description": "Sample for UpdateShieldedInstanceConfig", + "file": "notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateShieldedInstanceConfig_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_shielded_instance_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.update_shielded_instance_config", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpdateShieldedInstanceConfig", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpdateShieldedInstanceConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_shielded_instance_config" + }, + "description": "Sample for UpdateShieldedInstanceConfig", + "file": "notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpdateShieldedInstanceConfig_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_update_shielded_instance_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.upgrade_instance_internal", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpgradeInstanceInternal", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance_internal" + }, + "description": "Sample for UpgradeInstanceInternal", + "file": "notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpgradeInstanceInternal_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_upgrade_instance_internal_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.upgrade_instance_internal", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpgradeInstanceInternal", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance_internal" + }, + "description": "Sample for UpgradeInstanceInternal", + "file": "notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpgradeInstanceInternal_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_upgrade_instance_internal_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceAsyncClient.upgrade_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpgradeInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "notebooks_v1_generated_notebook_service_upgrade_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpgradeInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_upgrade_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1.NotebookServiceClient.upgrade_instance", + "method": { + "fullName": "google.cloud.notebooks.v1.NotebookService.UpgradeInstance", + "service": { + "fullName": "google.cloud.notebooks.v1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1.types.UpgradeInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "notebooks_v1_generated_notebook_service_upgrade_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1_generated_NotebookService_UpgradeInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1_generated_notebook_service_upgrade_instance_sync.py" + } + ] +} diff --git a/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1beta1.json b/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1beta1.json new file mode 100644 index 000000000000..7bc31789024f --- /dev/null +++ b/packages/google-cloud-notebooks/samples/generated_samples/snippet_metadata_google.cloud.notebooks.v1beta1.json @@ -0,0 +1,2922 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.notebooks.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-notebooks", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.create_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.CreateEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.CreateEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_environment" + }, + "description": "Sample for CreateEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_create_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_CreateEnvironment_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_create_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.create_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.CreateEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.CreateEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_environment" + }, + "description": "Sample for CreateEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_create_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_CreateEnvironment_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_create_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.CreateInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.CreateInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "notebooks_v1beta1_generated_notebook_service_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_CreateInstance_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.create_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.CreateInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.CreateInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "notebooks_v1beta1_generated_notebook_service_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_CreateInstance_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.delete_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.DeleteEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.DeleteEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_environment" + }, + "description": "Sample for DeleteEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_delete_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_DeleteEnvironment_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_delete_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.delete_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.DeleteEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.DeleteEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_environment" + }, + "description": "Sample for DeleteEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_DeleteEnvironment_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_delete_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.DeleteInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.DeleteInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "notebooks_v1beta1_generated_notebook_service_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_DeleteInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.delete_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.DeleteInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.DeleteInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_DeleteInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.get_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.GetEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.GetEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.Environment", + "shortName": "get_environment" + }, + "description": "Sample for GetEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_get_environment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_GetEnvironment_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_get_environment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.get_environment", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.GetEnvironment", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetEnvironment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.GetEnvironmentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.Environment", + "shortName": "get_environment" + }, + "description": "Sample for GetEnvironment", + "file": "notebooks_v1beta1_generated_notebook_service_get_environment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_GetEnvironment_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_get_environment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.GetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.GetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "notebooks_v1beta1_generated_notebook_service_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.get_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.GetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.GetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "notebooks_v1beta1_generated_notebook_service_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.is_instance_upgradeable", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.IsInstanceUpgradeable", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableResponse", + "shortName": "is_instance_upgradeable" + }, + "description": "Sample for IsInstanceUpgradeable", + "file": "notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_IsInstanceUpgradeable_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.is_instance_upgradeable", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.IsInstanceUpgradeable", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "IsInstanceUpgradeable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.types.IsInstanceUpgradeableResponse", + "shortName": "is_instance_upgradeable" + }, + "description": "Sample for IsInstanceUpgradeable", + "file": "notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_IsInstanceUpgradeable_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_is_instance_upgradeable_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.list_environments", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ListEnvironments", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListEnvironments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ListEnvironmentsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.services.notebook_service.pagers.ListEnvironmentsAsyncPager", + "shortName": "list_environments" + }, + "description": "Sample for ListEnvironments", + "file": "notebooks_v1beta1_generated_notebook_service_list_environments_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ListEnvironments_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_list_environments_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.list_environments", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ListEnvironments", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListEnvironments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ListEnvironmentsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.services.notebook_service.pagers.ListEnvironmentsPager", + "shortName": "list_environments" + }, + "description": "Sample for ListEnvironments", + "file": "notebooks_v1beta1_generated_notebook_service_list_environments_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ListEnvironments_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_list_environments_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ListInstances", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ListInstancesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.services.notebook_service.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "notebooks_v1beta1_generated_notebook_service_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ListInstances_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.list_instances", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ListInstances", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ListInstancesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.notebooks_v1beta1.services.notebook_service.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "notebooks_v1beta1_generated_notebook_service_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ListInstances_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.register_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.RegisterInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.RegisterInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "register_instance" + }, + "description": "Sample for RegisterInstance", + "file": "notebooks_v1beta1_generated_notebook_service_register_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_RegisterInstance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_register_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.register_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.RegisterInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "RegisterInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.RegisterInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "register_instance" + }, + "description": "Sample for RegisterInstance", + "file": "notebooks_v1beta1_generated_notebook_service_register_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_RegisterInstance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_register_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.report_instance_info", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ReportInstanceInfo", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ReportInstanceInfoRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "report_instance_info" + }, + "description": "Sample for ReportInstanceInfo", + "file": "notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ReportInstanceInfo_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_report_instance_info_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.report_instance_info", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ReportInstanceInfo", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ReportInstanceInfo" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ReportInstanceInfoRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "report_instance_info" + }, + "description": "Sample for ReportInstanceInfo", + "file": "notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ReportInstanceInfo_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_report_instance_info_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.reset_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ResetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ResetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "notebooks_v1beta1_generated_notebook_service_reset_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ResetInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_reset_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.reset_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.ResetInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.ResetInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_ResetInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_reset_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.set_instance_accelerator", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceAccelerator", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceAcceleratorRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_accelerator" + }, + "description": "Sample for SetInstanceAccelerator", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceAccelerator_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.set_instance_accelerator", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceAccelerator", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceAccelerator" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceAcceleratorRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_accelerator" + }, + "description": "Sample for SetInstanceAccelerator", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceAccelerator_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_accelerator_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.set_instance_labels", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceLabels", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceLabelsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_labels" + }, + "description": "Sample for SetInstanceLabels", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceLabels_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_labels_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.set_instance_labels", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceLabels", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceLabels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceLabelsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_labels" + }, + "description": "Sample for SetInstanceLabels", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceLabels_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_labels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.set_instance_machine_type", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceMachineType", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceMachineTypeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_instance_machine_type" + }, + "description": "Sample for SetInstanceMachineType", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceMachineType_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.set_instance_machine_type", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.SetInstanceMachineType", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "SetInstanceMachineType" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.SetInstanceMachineTypeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_instance_machine_type" + }, + "description": "Sample for SetInstanceMachineType", + "file": "notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_SetInstanceMachineType_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_set_instance_machine_type_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.start_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.StartInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.StartInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "notebooks_v1beta1_generated_notebook_service_start_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_StartInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_start_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.start_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.StartInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.StartInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "notebooks_v1beta1_generated_notebook_service_start_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_StartInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_start_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.stop_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.StopInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.StopInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "notebooks_v1beta1_generated_notebook_service_stop_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_StopInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_stop_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.stop_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.StopInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.StopInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_StopInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_stop_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.upgrade_instance_internal", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.UpgradeInstanceInternal", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.UpgradeInstanceInternalRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance_internal" + }, + "description": "Sample for UpgradeInstanceInternal", + "file": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_UpgradeInstanceInternal_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.upgrade_instance_internal", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.UpgradeInstanceInternal", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstanceInternal" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.UpgradeInstanceInternalRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance_internal" + }, + "description": "Sample for UpgradeInstanceInternal", + "file": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_UpgradeInstanceInternal_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_internal_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient", + "shortName": "NotebookServiceAsyncClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceAsyncClient.upgrade_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.UpgradeInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.UpgradeInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_UpgradeInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient", + "shortName": "NotebookServiceClient" + }, + "fullName": "google.cloud.notebooks_v1beta1.NotebookServiceClient.upgrade_instance", + "method": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService.UpgradeInstance", + "service": { + "fullName": "google.cloud.notebooks.v1beta1.NotebookService", + "shortName": "NotebookService" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.notebooks_v1beta1.types.UpgradeInstanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "notebooks_v1beta1_generated_NotebookService_UpgradeInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "notebooks_v1beta1_generated_notebook_service_upgrade_instance_sync.py" + } + ] +} diff --git a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_managed_notebook_service.py b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_managed_notebook_service.py index 91c5207b992a..f43179fe267b 100644 --- a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_managed_notebook_service.py +++ b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_managed_notebook_service.py @@ -1142,9 +1142,11 @@ async def test_list_runtimes_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_runtimes(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1174,7 +1176,6 @@ def test_get_runtime(request_type, transport: str = "grpc"): name="name_value", state=runtime.Runtime.State.STARTING, health_state=runtime.Runtime.HealthState.HEALTHY, - virtual_machine=runtime.VirtualMachine(instance_name="instance_name_value"), ) response = client.get_runtime(request) diff --git a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_notebook_service.py b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_notebook_service.py index a3382ce6dbae..aec555991529 100644 --- a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_notebook_service.py +++ b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1/test_notebook_service.py @@ -1136,9 +1136,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1190,7 +1192,6 @@ def test_get_instance(request_type, transport: str = "grpc"): nic_type=instance.Instance.NicType.VIRTIO_NET, creator="creator_value", can_ip_forward=True, - vm_image=environment.VmImage(project="project_value"), ) response = client.get_instance(request) @@ -5177,9 +5178,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5210,7 +5213,6 @@ def test_get_environment(request_type, transport: str = "grpc"): display_name="display_name_value", description="description_value", post_startup_script="post_startup_script_value", - vm_image=environment.VmImage(project="project_value"), ) response = client.get_environment(request) @@ -6346,9 +6348,11 @@ async def test_list_schedules_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_schedules(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7634,9 +7638,11 @@ async def test_list_executions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_executions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1beta1/test_notebook_service.py b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1beta1/test_notebook_service.py index 7943bcead95b..28271052f2f2 100644 --- a/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1beta1/test_notebook_service.py +++ b/packages/google-cloud-notebooks/tests/unit/gapic/notebooks_v1beta1/test_notebook_service.py @@ -1076,9 +1076,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1127,7 +1129,6 @@ def test_get_instance(request_type, transport: str = "grpc"): subnet="subnet_value", nic_type=instance.Instance.NicType.VIRTIO_NET, can_ip_forward=True, - vm_image=environment.VmImage(project="project_value"), ) response = client.get_instance(request) @@ -3629,9 +3630,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3662,7 +3665,6 @@ def test_get_environment(request_type, transport: str = "grpc"): display_name="display_name_value", description="description_value", post_startup_script="post_startup_script_value", - vm_image=environment.VmImage(project="project_value"), ) response = client.get_environment(request) @@ -4431,7 +4433,6 @@ def test_get_instance_rest(request_type): subnet="subnet_value", nic_type=instance.Instance.NicType.VIRTIO_NET, can_ip_forward=True, - vm_image=environment.VmImage(project="project_value"), ) # Wrap the value into a proper Response obj @@ -7822,7 +7823,6 @@ def test_get_environment_rest(request_type): display_name="display_name_value", description="description_value", post_startup_script="post_startup_script_value", - vm_image=environment.VmImage(project="project_value"), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/environments/async_client.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/environments/async_client.py index 411435e605ec..53c19a704b8f 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/environments/async_client.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/environments/async_client.py @@ -1779,7 +1779,7 @@ async def delete_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "EnvironmentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/image_versions/async_client.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/image_versions/async_client.py index 95fd0cbf7c0c..76c8e277d08a 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/image_versions/async_client.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/services/image_versions/async_client.py @@ -494,7 +494,7 @@ async def delete_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "ImageVersionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/environments/async_client.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/environments/async_client.py index 09cc9dabb09b..c04d50c0d7cb 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/environments/async_client.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/environments/async_client.py @@ -2012,7 +2012,7 @@ async def delete_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "EnvironmentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/async_client.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/async_client.py index 3a337bf9da4b..e3c40a3b0ee2 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/async_client.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/async_client.py @@ -496,7 +496,7 @@ async def delete_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "ImageVersionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-orchestration-airflow/noxfile.py b/packages/google-cloud-orchestration-airflow/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-orchestration-airflow/noxfile.py +++ b/packages/google-cloud-orchestration-airflow/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_environments.py b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_environments.py index afd2db8d888c..6d8f0bc84d98 100644 --- a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_environments.py +++ b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_environments.py @@ -1626,9 +1626,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_image_versions.py b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_image_versions.py index 334749d32b93..bed2f3021cc1 100644 --- a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_image_versions.py +++ b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1/test_image_versions.py @@ -1138,9 +1138,11 @@ async def test_list_image_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_image_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py index 2e0991985c5d..45664b6ba22b 100644 --- a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py +++ b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py @@ -1629,9 +1629,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_image_versions.py b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_image_versions.py index 91cd48edee5d..faf739898a77 100644 --- a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_image_versions.py +++ b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_image_versions.py @@ -1138,9 +1138,11 @@ async def test_list_image_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_image_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection/gapic_version.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection/gapic_version.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic_version.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic_version.py index 163d151126d8..30274cc6e9dd 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic_version.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/async_client.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/async_client.py index a8b4de288d13..3e097845c97a 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/async_client.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/async_client.py @@ -347,7 +347,7 @@ async def sample_report_phishing(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PhishingProtectionServiceV1Beta1AsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-phishing-protection/noxfile.py b/packages/google-cloud-phishing-protection/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-phishing-protection/noxfile.py +++ b/packages/google-cloud-phishing-protection/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py b/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py new file mode 100644 index 000000000000..39b92bdbe537 --- /dev/null +++ b/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ReportPhishing +# 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-phishing-protection + + +# [START phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import phishingprotection_v1beta1 + + +async def sample_report_phishing(): + # Create a client + client = phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1AsyncClient() + + # Initialize request argument(s) + request = phishingprotection_v1beta1.ReportPhishingRequest( + parent="parent_value", + uri="uri_value", + ) + + # Make the request + response = await client.report_phishing(request=request) + + # Handle the response + print(response) + +# [END phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_async] diff --git a/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py b/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py new file mode 100644 index 000000000000..8fdcb6519e79 --- /dev/null +++ b/packages/google-cloud-phishing-protection/samples/generated_samples/phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ReportPhishing +# 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-phishing-protection + + +# [START phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import phishingprotection_v1beta1 + + +def sample_report_phishing(): + # Create a client + client = phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1Client() + + # Initialize request argument(s) + request = phishingprotection_v1beta1.ReportPhishingRequest( + parent="parent_value", + uri="uri_value", + ) + + # Make the request + response = client.report_phishing(request=request) + + # Handle the response + print(response) + +# [END phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_sync] diff --git a/packages/google-cloud-phishing-protection/samples/generated_samples/snippet_metadata_google.cloud.phishingprotection.v1beta1.json b/packages/google-cloud-phishing-protection/samples/generated_samples/snippet_metadata_google.cloud.phishingprotection.v1beta1.json new file mode 100644 index 000000000000..250bb4a74445 --- /dev/null +++ b/packages/google-cloud-phishing-protection/samples/generated_samples/snippet_metadata_google.cloud.phishingprotection.v1beta1.json @@ -0,0 +1,184 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.phishingprotection.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-phishing-protection", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1AsyncClient", + "shortName": "PhishingProtectionServiceV1Beta1AsyncClient" + }, + "fullName": "google.cloud.phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1AsyncClient.report_phishing", + "method": { + "fullName": "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1.ReportPhishing", + "service": { + "fullName": "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1", + "shortName": "PhishingProtectionServiceV1Beta1" + }, + "shortName": "ReportPhishing" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.phishingprotection_v1beta1.types.ReportPhishingRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "uri", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.phishingprotection_v1beta1.types.ReportPhishingResponse", + "shortName": "report_phishing" + }, + "description": "Sample for ReportPhishing", + "file": "phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1Client", + "shortName": "PhishingProtectionServiceV1Beta1Client" + }, + "fullName": "google.cloud.phishingprotection_v1beta1.PhishingProtectionServiceV1Beta1Client.report_phishing", + "method": { + "fullName": "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1.ReportPhishing", + "service": { + "fullName": "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1", + "shortName": "PhishingProtectionServiceV1Beta1" + }, + "shortName": "ReportPhishing" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.phishingprotection_v1beta1.types.ReportPhishingRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "uri", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.phishingprotection_v1beta1.types.ReportPhishingResponse", + "shortName": "report_phishing" + }, + "description": "Sample for ReportPhishing", + "file": "phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "phishingprotection_v1beta1_generated_phishing_protection_service_v1_beta1_report_phishing_sync.py" + } + ] +} diff --git a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter/gapic_version.py b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter/gapic_version.py index 90e02933f3a4..30274cc6e9dd 100644 --- a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter/gapic_version.py +++ b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/gapic_version.py b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/gapic_version.py index 90e02933f3a4..30274cc6e9dd 100644 --- a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/gapic_version.py +++ b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/services/iam_checker/async_client.py b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/services/iam_checker/async_client.py index e525226388e9..94a5e7e60baa 100644 --- a/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/services/iam_checker/async_client.py +++ b/packages/google-cloud-policy-troubleshooter/google/cloud/policytroubleshooter_v1/services/iam_checker/async_client.py @@ -283,7 +283,7 @@ async def sample_troubleshoot_iam_policy(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "IamCheckerAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-policy-troubleshooter/noxfile.py b/packages/google-cloud-policy-troubleshooter/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-policy-troubleshooter/noxfile.py +++ b/packages/google-cloud-policy-troubleshooter/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py new file mode 100644 index 000000000000..b775e055a739 --- /dev/null +++ b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TroubleshootIamPolicy +# 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-policy-troubleshooter + + +# [START policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import policytroubleshooter_v1 + + +async def sample_troubleshoot_iam_policy(): + # Create a client + client = policytroubleshooter_v1.IamCheckerAsyncClient() + + # Initialize request argument(s) + request = policytroubleshooter_v1.TroubleshootIamPolicyRequest( + ) + + # Make the request + response = await client.troubleshoot_iam_policy(request=request) + + # Handle the response + print(response) + +# [END policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async] diff --git a/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py new file mode 100644 index 000000000000..88bcd69711c7 --- /dev/null +++ b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TroubleshootIamPolicy +# 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-policy-troubleshooter + + +# [START policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import policytroubleshooter_v1 + + +def sample_troubleshoot_iam_policy(): + # Create a client + client = policytroubleshooter_v1.IamCheckerClient() + + # Initialize request argument(s) + request = policytroubleshooter_v1.TroubleshootIamPolicyRequest( + ) + + # Make the request + response = client.troubleshoot_iam_policy(request=request) + + # Handle the response + print(response) + +# [END policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_sync] diff --git a/packages/google-cloud-policy-troubleshooter/samples/generated_samples/snippet_metadata_google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/snippet_metadata_google.cloud.policytroubleshooter.v1.json new file mode 100644 index 000000000000..f5712f1a7dff --- /dev/null +++ b/packages/google-cloud-policy-troubleshooter/samples/generated_samples/snippet_metadata_google.cloud.policytroubleshooter.v1.json @@ -0,0 +1,168 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.policytroubleshooter.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-policy-troubleshooter", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.policytroubleshooter_v1.IamCheckerAsyncClient", + "shortName": "IamCheckerAsyncClient" + }, + "fullName": "google.cloud.policytroubleshooter_v1.IamCheckerAsyncClient.troubleshoot_iam_policy", + "method": { + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "service": { + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker", + "shortName": "IamChecker" + }, + "shortName": "TroubleshootIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.policytroubleshooter_v1.types.TroubleshootIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.policytroubleshooter_v1.types.TroubleshootIamPolicyResponse", + "shortName": "troubleshoot_iam_policy" + }, + "description": "Sample for TroubleshootIamPolicy", + "file": "policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.policytroubleshooter_v1.IamCheckerClient", + "shortName": "IamCheckerClient" + }, + "fullName": "google.cloud.policytroubleshooter_v1.IamCheckerClient.troubleshoot_iam_policy", + "method": { + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "service": { + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker", + "shortName": "IamChecker" + }, + "shortName": "TroubleshootIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.policytroubleshooter_v1.types.TroubleshootIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.policytroubleshooter_v1.types.TroubleshootIamPolicyResponse", + "shortName": "troubleshoot_iam_policy" + }, + "description": "Sample for TroubleshootIamPolicy", + "file": "policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "policytroubleshooter_v1_generated_iam_checker_troubleshoot_iam_policy_sync.py" + } + ] +} diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca/gapic_version.py b/packages/google-cloud-private-ca/google/cloud/security/privateca/gapic_version.py index b334dccf50ad..30274cc6e9dd 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca/gapic_version.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/gapic_version.py b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/gapic_version.py index b334dccf50ad..30274cc6e9dd 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/gapic_version.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py index ad8e751cd687..d78d5b9370c6 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/async_client.py @@ -4516,7 +4516,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CertificateAuthorityServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/transports/rest.py b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/transports/rest.py index 9734a6e4b38c..64d7ff95e10b 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/transports/rest.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1/services/certificate_authority_service/transports/rest.py @@ -4651,7 +4651,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -4733,7 +4733,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -4802,7 +4802,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/gapic_version.py b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/gapic_version.py index b334dccf50ad..30274cc6e9dd 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/gapic_version.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py index 41d3a5934a7c..38342c2513a5 100644 --- a/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py +++ b/packages/google-cloud-private-ca/google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py @@ -2716,7 +2716,7 @@ async def sample_list_reusable_configs(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CertificateAuthorityServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-private-ca/noxfile.py b/packages/google-cloud-private-ca/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-private-ca/noxfile.py +++ b/packages/google-cloud-private-ca/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py new file mode 100644 index 000000000000..2d9a8271b5ee --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ActivateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_activate_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + subordinate_config = privateca_v1.SubordinateConfig() + subordinate_config.certificate_authority = "certificate_authority_value" + + request = privateca_v1.ActivateCertificateAuthorityRequest( + name="name_value", + pem_ca_certificate="pem_ca_certificate_value", + subordinate_config=subordinate_config, + ) + + # Make the request + operation = client.activate_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py new file mode 100644 index 000000000000..481e2403d6a7 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ActivateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_activate_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + subordinate_config = privateca_v1.SubordinateConfig() + subordinate_config.certificate_authority = "certificate_authority_value" + + request = privateca_v1.ActivateCertificateAuthorityRequest( + name="name_value", + pem_ca_certificate="pem_ca_certificate_value", + subordinate_config=subordinate_config, + ) + + # Make the request + operation = client.activate_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py new file mode 100644 index 000000000000..47d817649064 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_create_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + ca_pool = privateca_v1.CaPool() + ca_pool.tier = "DEVOPS" + + request = privateca_v1.CreateCaPoolRequest( + parent="parent_value", + ca_pool_id="ca_pool_id_value", + ca_pool=ca_pool, + ) + + # Make the request + operation = client.create_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py new file mode 100644 index 000000000000..c9d01e2c291b --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_create_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + ca_pool = privateca_v1.CaPool() + ca_pool.tier = "DEVOPS" + + request = privateca_v1.CreateCaPoolRequest( + parent="parent_value", + ca_pool_id="ca_pool_id_value", + ca_pool=ca_pool, + ) + + # Make the request + operation = client.create_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_async.py new file mode 100644 index 000000000000..fbdd1d598a6a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_create_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate = privateca_v1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1.CreateCertificateRequest( + parent="parent_value", + certificate=certificate, + ) + + # Make the request + response = await client.create_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py new file mode 100644 index 000000000000..33649101b24e --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_create_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1.CreateCertificateAuthorityRequest( + parent="parent_value", + certificate_authority_id="certificate_authority_id_value", + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.create_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py new file mode 100644 index 000000000000..5da1b58f6020 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_create_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1.CreateCertificateAuthorityRequest( + parent="parent_value", + certificate_authority_id="certificate_authority_id_value", + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.create_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_sync.py new file mode 100644 index 000000000000..c9a50c8ac7f6 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_create_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate = privateca_v1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1.CreateCertificateRequest( + parent="parent_value", + certificate=certificate, + ) + + # Make the request + response = client.create_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py new file mode 100644 index 000000000000..077af941d877 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_create_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.CreateCertificateTemplateRequest( + parent="parent_value", + certificate_template_id="certificate_template_id_value", + ) + + # Make the request + operation = client.create_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py new file mode 100644 index 000000000000..3a50d322791a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_create_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.CreateCertificateTemplateRequest( + parent="parent_value", + certificate_template_id="certificate_template_id_value", + ) + + # Make the request + operation = client.create_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py new file mode 100644 index 000000000000..73f21f93c75a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_delete_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCaPoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py new file mode 100644 index 000000000000..eda61b06166e --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_delete_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCaPoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py new file mode 100644 index 000000000000..12ad27b5780c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_delete_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py new file mode 100644 index 000000000000..7ae0813a7c7d --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_delete_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py new file mode 100644 index 000000000000..8f3873942077 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_delete_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCertificateTemplateRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py new file mode 100644 index 000000000000..f7d352bf2755 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_delete_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.DeleteCertificateTemplateRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py new file mode 100644 index 000000000000..a60c3c60c785 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_disable_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.DisableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.disable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py new file mode 100644 index 000000000000..90e7039dae68 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_disable_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.DisableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.disable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py new file mode 100644 index 000000000000..0ab6aa15a14e --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_enable_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.EnableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.enable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py new file mode 100644 index 000000000000..3f030c7e1098 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_enable_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.EnableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.enable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py new file mode 100644 index 000000000000..081181385726 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCaCerts +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_fetch_ca_certs(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.FetchCaCertsRequest( + ca_pool="ca_pool_value", + ) + + # Make the request + response = await client.fetch_ca_certs(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py new file mode 100644 index 000000000000..4cb78a757f99 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCaCerts +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_fetch_ca_certs(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.FetchCaCertsRequest( + ca_pool="ca_pool_value", + ) + + # Make the request + response = client.fetch_ca_certs(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py new file mode 100644 index 000000000000..6462118a39b1 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCertificateAuthorityCsr +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_fetch_certificate_authority_csr(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.FetchCertificateAuthorityCsrRequest( + name="name_value", + ) + + # Make the request + response = await client.fetch_certificate_authority_csr(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py new file mode 100644 index 000000000000..3983c7cd97d0 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCertificateAuthorityCsr +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_fetch_certificate_authority_csr(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.FetchCertificateAuthorityCsrRequest( + name="name_value", + ) + + # Make the request + response = client.fetch_certificate_authority_csr(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py new file mode 100644 index 000000000000..78e391154f62 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCaPool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_get_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.GetCaPoolRequest( + name="name_value", + ) + + # Make the request + response = await client.get_ca_pool(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py new file mode 100644 index 000000000000..125d3d6d0a76 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_get_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.GetCaPoolRequest( + name="name_value", + ) + + # Make the request + response = client.get_ca_pool(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_async.py new file mode 100644 index 000000000000..abda7fe2576d --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_get_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py new file mode 100644 index 000000000000..b0b0622cb273 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_get_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate_authority(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py new file mode 100644 index 000000000000..f1a9a940a240 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_get_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate_authority(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py new file mode 100644 index 000000000000..b332b11c14a2 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_get_certificate_revocation_list(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateRevocationListRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate_revocation_list(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py new file mode 100644 index 000000000000..22ece5446411 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_get_certificate_revocation_list(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateRevocationListRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate_revocation_list(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_sync.py new file mode 100644 index 000000000000..1ea19a848295 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_get_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py new file mode 100644 index 000000000000..17e5024211cb --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_get_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateTemplateRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate_template(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py new file mode 100644 index 000000000000..7fa2c4e14302 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_get_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.GetCertificateTemplateRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate_template(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py new file mode 100644 index 000000000000..f202c29747fb --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCaPools +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCaPools_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_list_ca_pools(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.ListCaPoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_ca_pools(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py new file mode 100644 index 000000000000..d875eb9b6aad --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCaPools +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_list_ca_pools(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.ListCaPoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_ca_pools(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py new file mode 100644 index 000000000000..3ebacd5560c1 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateAuthorities +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_list_certificate_authorities(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateAuthoritiesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_authorities(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py new file mode 100644 index 000000000000..ce41c0e45601 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateAuthorities +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_list_certificate_authorities(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateAuthoritiesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_authorities(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py new file mode 100644 index 000000000000..c74051b0b7a6 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateRevocationLists +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_list_certificate_revocation_lists(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateRevocationListsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_revocation_lists(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py new file mode 100644 index 000000000000..0a6efa763d82 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateRevocationLists +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_list_certificate_revocation_lists(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateRevocationListsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_revocation_lists(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py new file mode 100644 index 000000000000..831eb0a0bcff --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateTemplates +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_list_certificate_templates(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateTemplatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_templates(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py new file mode 100644 index 000000000000..50a927779aaf --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateTemplates +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_list_certificate_templates(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificateTemplatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_templates(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_async.py new file mode 100644 index 000000000000..3f5ce098abca --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificates +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificates_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_list_certificates(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificates(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_sync.py new file mode 100644 index 000000000000..9048d801d10f --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_list_certificates_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificates +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_list_certificates(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.ListCertificatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificates(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py new file mode 100644 index 000000000000..a75a4e0a6c18 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RevokeCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_revoke_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.RevokeCertificateRequest( + name="name_value", + reason="ATTRIBUTE_AUTHORITY_COMPROMISE", + ) + + # Make the request + response = await client.revoke_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py new file mode 100644 index 000000000000..b65e819f903c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RevokeCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_revoke_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.RevokeCertificateRequest( + name="name_value", + reason="ATTRIBUTE_AUTHORITY_COMPROMISE", + ) + + # Make the request + response = client.revoke_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py new file mode 100644 index 000000000000..2152997c24e0 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_undelete_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.UndeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py new file mode 100644 index 000000000000..640c77b9f6b8 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_undelete_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.UndeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py new file mode 100644 index 000000000000..e8995ba197e4 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_update_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + ca_pool = privateca_v1.CaPool() + ca_pool.tier = "DEVOPS" + + request = privateca_v1.UpdateCaPoolRequest( + ca_pool=ca_pool, + ) + + # Make the request + operation = client.update_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py new file mode 100644 index 000000000000..278831e1bf8d --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCaPool +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_update_ca_pool(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + ca_pool = privateca_v1.CaPool() + ca_pool.tier = "DEVOPS" + + request = privateca_v1.UpdateCaPoolRequest( + ca_pool=ca_pool, + ) + + # Make the request + operation = client.update_ca_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_async.py new file mode 100644 index 000000000000..251865fbfdf1 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_update_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate = privateca_v1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1.UpdateCertificateRequest( + certificate=certificate, + ) + + # Make the request + response = await client.update_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py new file mode 100644 index 000000000000..c5fc60286144 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_update_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1.UpdateCertificateAuthorityRequest( + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.update_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py new file mode 100644 index 000000000000..cbd3b8d77de3 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_update_certificate_authority(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1.UpdateCertificateAuthorityRequest( + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.update_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py new file mode 100644 index 000000000000..a422713dc917 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_update_certificate_revocation_list(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.UpdateCertificateRevocationListRequest( + ) + + # Make the request + operation = client.update_certificate_revocation_list(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py new file mode 100644 index 000000000000..e29909ecd081 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_update_certificate_revocation_list(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.UpdateCertificateRevocationListRequest( + ) + + # Make the request + operation = client.update_certificate_revocation_list(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_sync.py new file mode 100644 index 000000000000..2f4ad51b4a4f --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_update_certificate(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate = privateca_v1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1.UpdateCertificateRequest( + certificate=certificate, + ) + + # Make the request + response = client.update_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py new file mode 100644 index 000000000000..adb35a9f96df --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +async def sample_update_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1.UpdateCertificateTemplateRequest( + ) + + # Make the request + operation = client.update_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py new file mode 100644 index 000000000000..3a6fd820f578 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateTemplate +# 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-private-ca + + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1 + + +def sample_update_certificate_template(): + # Create a client + client = privateca_v1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1.UpdateCertificateTemplateRequest( + ) + + # Make the request + operation = client.update_certificate_template(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py new file mode 100644 index 000000000000..50aa8e579eeb --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ActivateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_activate_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + subordinate_config = privateca_v1beta1.SubordinateConfig() + subordinate_config.certificate_authority = "certificate_authority_value" + + request = privateca_v1beta1.ActivateCertificateAuthorityRequest( + name="name_value", + pem_ca_certificate="pem_ca_certificate_value", + subordinate_config=subordinate_config, + ) + + # Make the request + operation = client.activate_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py new file mode 100644 index 000000000000..14714cb59cdb --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ActivateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_activate_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + subordinate_config = privateca_v1beta1.SubordinateConfig() + subordinate_config.certificate_authority = "certificate_authority_value" + + request = privateca_v1beta1.ActivateCertificateAuthorityRequest( + name="name_value", + pem_ca_certificate="pem_ca_certificate_value", + subordinate_config=subordinate_config, + ) + + # Make the request + operation = client.activate_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py new file mode 100644 index 000000000000..60a417709a24 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_create_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate = privateca_v1beta1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1beta1.CreateCertificateRequest( + parent="parent_value", + certificate=certificate, + ) + + # Make the request + response = await client.create_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py new file mode 100644 index 000000000000..6bd5662836c7 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_create_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1beta1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.tier = "DEVOPS" + certificate_authority.config.reusable_config.reusable_config = "reusable_config_value" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1beta1.CreateCertificateAuthorityRequest( + parent="parent_value", + certificate_authority_id="certificate_authority_id_value", + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.create_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py new file mode 100644 index 000000000000..e424a24dea94 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_create_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1beta1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.tier = "DEVOPS" + certificate_authority.config.reusable_config.reusable_config = "reusable_config_value" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1beta1.CreateCertificateAuthorityRequest( + parent="parent_value", + certificate_authority_id="certificate_authority_id_value", + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.create_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py new file mode 100644 index 000000000000..6c983331fd04 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_create_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate = privateca_v1beta1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1beta1.CreateCertificateRequest( + parent="parent_value", + certificate=certificate, + ) + + # Make the request + response = client.create_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py new file mode 100644 index 000000000000..82422e09016a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_disable_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.DisableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.disable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py new file mode 100644 index 000000000000..da11d68a2fad --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_disable_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.DisableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.disable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py new file mode 100644 index 000000000000..617d34741b40 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_enable_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.EnableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.enable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py new file mode 100644 index 000000000000..aee82e94e6ba --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_enable_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.EnableCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.enable_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py new file mode 100644 index 000000000000..01b0defc48b9 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCertificateAuthorityCsr +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_fetch_certificate_authority_csr(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.FetchCertificateAuthorityCsrRequest( + name="name_value", + ) + + # Make the request + response = await client.fetch_certificate_authority_csr(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py new file mode 100644 index 000000000000..02d884eb592b --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FetchCertificateAuthorityCsr +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_fetch_certificate_authority_csr(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.FetchCertificateAuthorityCsrRequest( + name="name_value", + ) + + # Make the request + response = client.fetch_certificate_authority_csr(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py new file mode 100644 index 000000000000..2bcb79e5192c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_get_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py new file mode 100644 index 000000000000..04d6313cb9f7 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_get_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate_authority(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py new file mode 100644 index 000000000000..a616a347ff5c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_get_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate_authority(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py new file mode 100644 index 000000000000..7d12c4917b59 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_get_certificate_revocation_list(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateRevocationListRequest( + name="name_value", + ) + + # Make the request + response = await client.get_certificate_revocation_list(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py new file mode 100644 index 000000000000..c640ef53e96c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_get_certificate_revocation_list(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateRevocationListRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate_revocation_list(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py new file mode 100644 index 000000000000..6605b3c85ff9 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_get_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetCertificateRequest( + name="name_value", + ) + + # Make the request + response = client.get_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py new file mode 100644 index 000000000000..77b7c6494432 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetReusableConfig +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_get_reusable_config(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetReusableConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_reusable_config(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py new file mode 100644 index 000000000000..07f9f83db510 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetReusableConfig +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_get_reusable_config(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.GetReusableConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_reusable_config(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py new file mode 100644 index 000000000000..bdbfe919c3e4 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateAuthorities +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_list_certificate_authorities(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificateAuthoritiesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_authorities(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py new file mode 100644 index 000000000000..be78a7e12be0 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateAuthorities +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_list_certificate_authorities(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificateAuthoritiesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_authorities(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py new file mode 100644 index 000000000000..7dcd2e0994a6 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateRevocationLists +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_list_certificate_revocation_lists(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificateRevocationListsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_revocation_lists(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py new file mode 100644 index 000000000000..5ad590fa0135 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificateRevocationLists +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_list_certificate_revocation_lists(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificateRevocationListsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificate_revocation_lists(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py new file mode 100644 index 000000000000..9f76954837ae --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificates +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_list_certificates(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificates(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py new file mode 100644 index 000000000000..36ef888f921e --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCertificates +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_list_certificates(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListCertificatesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_certificates(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py new file mode 100644 index 000000000000..dc5652158c9e --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListReusableConfigs +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_list_reusable_configs(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListReusableConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reusable_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py new file mode 100644 index 000000000000..07a124580415 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListReusableConfigs +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_list_reusable_configs(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ListReusableConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reusable_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py new file mode 100644 index 000000000000..8f27dfc96d54 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RestoreCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_restore_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.RestoreCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.restore_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py new file mode 100644 index 000000000000..71aab921f75a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RestoreCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_restore_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.RestoreCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.restore_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py new file mode 100644 index 000000000000..b909a8af5ae0 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RevokeCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_revoke_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.RevokeCertificateRequest( + name="name_value", + reason="ATTRIBUTE_AUTHORITY_COMPROMISE", + ) + + # Make the request + response = await client.revoke_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py new file mode 100644 index 000000000000..45b4553e4b52 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RevokeCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_revoke_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.RevokeCertificateRequest( + name="name_value", + reason="ATTRIBUTE_AUTHORITY_COMPROMISE", + ) + + # Make the request + response = client.revoke_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py new file mode 100644 index 000000000000..e138cc87bb3f --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ScheduleDeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_schedule_delete_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ScheduleDeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.schedule_delete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py new file mode 100644 index 000000000000..29389bc94d74 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ScheduleDeleteCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_schedule_delete_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.ScheduleDeleteCertificateAuthorityRequest( + name="name_value", + ) + + # Make the request + operation = client.schedule_delete_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py new file mode 100644 index 000000000000..6a48c31150c1 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_update_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate = privateca_v1beta1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1beta1.UpdateCertificateRequest( + certificate=certificate, + ) + + # Make the request + response = await client.update_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py new file mode 100644 index 000000000000..42ac5e44467c --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_update_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1beta1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.tier = "DEVOPS" + certificate_authority.config.reusable_config.reusable_config = "reusable_config_value" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1beta1.UpdateCertificateAuthorityRequest( + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.update_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py new file mode 100644 index 000000000000..8a65090d8695 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateAuthority +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_update_certificate_authority(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate_authority = privateca_v1beta1.CertificateAuthority() + certificate_authority.type_ = "SUBORDINATE" + certificate_authority.tier = "DEVOPS" + certificate_authority.config.reusable_config.reusable_config = "reusable_config_value" + certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" + + request = privateca_v1beta1.UpdateCertificateAuthorityRequest( + certificate_authority=certificate_authority, + ) + + # Make the request + operation = client.update_certificate_authority(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py new file mode 100644 index 000000000000..a68f06aeee9b --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +async def sample_update_certificate_revocation_list(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = privateca_v1beta1.UpdateCertificateRevocationListRequest( + ) + + # Make the request + operation = client.update_certificate_revocation_list(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py new file mode 100644 index 000000000000..3ae5ddae5da3 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificateRevocationList +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_update_certificate_revocation_list(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = privateca_v1beta1.UpdateCertificateRevocationListRequest( + ) + + # Make the request + operation = client.update_certificate_revocation_list(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py new file mode 100644 index 000000000000..44beba854548 --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCertificate +# 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-private-ca + + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import privateca_v1beta1 + + +def sample_update_certificate(): + # Create a client + client = privateca_v1beta1.CertificateAuthorityServiceClient() + + # Initialize request argument(s) + certificate = privateca_v1beta1.Certificate() + certificate.pem_csr = "pem_csr_value" + + request = privateca_v1beta1.UpdateCertificateRequest( + certificate=certificate, + ) + + # Make the request + response = client.update_certificate(request=request) + + # Handle the response + print(response) + +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1.json b/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1.json new file mode 100644 index 000000000000..2ae53b32ea8d --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1.json @@ -0,0 +1,4788 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.security.privateca.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-private-ca", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.activate_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ActivateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ActivateCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "activate_certificate_authority" + }, + "description": "Sample for ActivateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_activate_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.activate_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ActivateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ActivateCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "activate_certificate_authority" + }, + "description": "Sample for ActivateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_activate_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.create_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCaPoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "ca_pool", + "type": "google.cloud.security.privateca_v1.types.CaPool" + }, + { + "name": "ca_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_ca_pool" + }, + "description": "Sample for CreateCaPool", + "file": "privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_ca_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.create_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCaPoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "ca_pool", + "type": "google.cloud.security.privateca_v1.types.CaPool" + }, + { + "name": "ca_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_ca_pool" + }, + "description": "Sample for CreateCaPool", + "file": "privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_ca_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.create_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateAuthorityRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1.types.CertificateAuthority" + }, + { + "name": "certificate_authority_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_certificate_authority" + }, + "description": "Sample for CreateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.create_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateAuthorityRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1.types.CertificateAuthority" + }, + { + "name": "certificate_authority_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_certificate_authority" + }, + "description": "Sample for CreateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.create_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateTemplateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_template", + "type": "google.cloud.security.privateca_v1.types.CertificateTemplate" + }, + { + "name": "certificate_template_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_certificate_template" + }, + "description": "Sample for CreateCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_template_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.create_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateTemplateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_template", + "type": "google.cloud.security.privateca_v1.types.CertificateTemplate" + }, + { + "name": "certificate_template_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_certificate_template" + }, + "description": "Sample for CreateCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_template_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.create_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1.types.Certificate" + }, + { + "name": "certificate_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "create_certificate" + }, + "description": "Sample for CreateCertificate", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.create_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.CreateCertificateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1.types.Certificate" + }, + { + "name": "certificate_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "create_certificate" + }, + "description": "Sample for CreateCertificate", + "file": "privateca_v1_generated_certificate_authority_service_create_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_create_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.delete_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCaPoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_ca_pool" + }, + "description": "Sample for DeleteCaPool", + "file": "privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_ca_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.delete_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCaPoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_ca_pool" + }, + "description": "Sample for DeleteCaPool", + "file": "privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_ca_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.delete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_certificate_authority" + }, + "description": "Sample for DeleteCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.delete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_certificate_authority" + }, + "description": "Sample for DeleteCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.delete_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCertificateTemplateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_certificate_template" + }, + "description": "Sample for DeleteCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_certificate_template_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.delete_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DeleteCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DeleteCertificateTemplateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_certificate_template" + }, + "description": "Sample for DeleteCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_delete_certificate_template_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.disable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DisableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DisableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "disable_certificate_authority" + }, + "description": "Sample for DisableCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_disable_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.disable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DisableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.DisableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "disable_certificate_authority" + }, + "description": "Sample for DisableCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_disable_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.enable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "EnableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.EnableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "enable_certificate_authority" + }, + "description": "Sample for EnableCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_enable_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.enable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "EnableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.EnableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "enable_certificate_authority" + }, + "description": "Sample for EnableCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_enable_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.fetch_ca_certs", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCaCerts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.FetchCaCertsRequest" + }, + { + "name": "ca_pool", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.FetchCaCertsResponse", + "shortName": "fetch_ca_certs" + }, + "description": "Sample for FetchCaCerts", + "file": "privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_fetch_ca_certs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.fetch_ca_certs", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCaCerts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.FetchCaCertsRequest" + }, + { + "name": "ca_pool", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.FetchCaCertsResponse", + "shortName": "fetch_ca_certs" + }, + "description": "Sample for FetchCaCerts", + "file": "privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_fetch_ca_certs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.fetch_certificate_authority_csr", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCertificateAuthorityCsr" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrResponse", + "shortName": "fetch_certificate_authority_csr" + }, + "description": "Sample for FetchCertificateAuthorityCsr", + "file": "privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.fetch_certificate_authority_csr", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCertificateAuthorityCsr" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrResponse", + "shortName": "fetch_certificate_authority_csr" + }, + "description": "Sample for FetchCertificateAuthorityCsr", + "file": "privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.get_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCaPoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CaPool", + "shortName": "get_ca_pool" + }, + "description": "Sample for GetCaPool", + "file": "privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_ca_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.get_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCaPoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CaPool", + "shortName": "get_ca_pool" + }, + "description": "Sample for GetCaPool", + "file": "privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_ca_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.get_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateAuthority", + "shortName": "get_certificate_authority" + }, + "description": "Sample for GetCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.get_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateAuthority", + "shortName": "get_certificate_authority" + }, + "description": "Sample for GetCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.get_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateRevocationListRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateRevocationList", + "shortName": "get_certificate_revocation_list" + }, + "description": "Sample for GetCertificateRevocationList", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.get_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateRevocationListRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateRevocationList", + "shortName": "get_certificate_revocation_list" + }, + "description": "Sample for GetCertificateRevocationList", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.get_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateTemplateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateTemplate", + "shortName": "get_certificate_template" + }, + "description": "Sample for GetCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_template_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.get_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateTemplateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.CertificateTemplate", + "shortName": "get_certificate_template" + }, + "description": "Sample for GetCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_template_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.get_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "get_certificate" + }, + "description": "Sample for GetCertificate", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.get_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.GetCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "get_certificate" + }, + "description": "Sample for GetCertificate", + "file": "privateca_v1_generated_certificate_authority_service_get_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_get_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.list_ca_pools", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCaPools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCaPoolsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsAsyncPager", + "shortName": "list_ca_pools" + }, + "description": "Sample for ListCaPools", + "file": "privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_ca_pools_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.list_ca_pools", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCaPools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCaPoolsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsPager", + "shortName": "list_ca_pools" + }, + "description": "Sample for ListCaPools", + "file": "privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_ca_pools_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.list_certificate_authorities", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateAuthorities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager", + "shortName": "list_certificate_authorities" + }, + "description": "Sample for ListCertificateAuthorities", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_authorities_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.list_certificate_authorities", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateAuthorities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesPager", + "shortName": "list_certificate_authorities" + }, + "description": "Sample for ListCertificateAuthorities", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_authorities_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.list_certificate_revocation_lists", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateRevocationLists" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager", + "shortName": "list_certificate_revocation_lists" + }, + "description": "Sample for ListCertificateRevocationLists", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.list_certificate_revocation_lists", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateRevocationLists" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsPager", + "shortName": "list_certificate_revocation_lists" + }, + "description": "Sample for ListCertificateRevocationLists", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.list_certificate_templates", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateTemplates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesAsyncPager", + "shortName": "list_certificate_templates" + }, + "description": "Sample for ListCertificateTemplates", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_templates_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.list_certificate_templates", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateTemplates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesPager", + "shortName": "list_certificate_templates" + }, + "description": "Sample for ListCertificateTemplates", + "file": "privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificate_templates_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.list_certificates", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager", + "shortName": "list_certificates" + }, + "description": "Sample for ListCertificates", + "file": "privateca_v1_generated_certificate_authority_service_list_certificates_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificates_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.list_certificates", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.ListCertificatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesPager", + "shortName": "list_certificates" + }, + "description": "Sample for ListCertificates", + "file": "privateca_v1_generated_certificate_authority_service_list_certificates_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_list_certificates_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.revoke_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RevokeCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.RevokeCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "revoke_certificate" + }, + "description": "Sample for RevokeCertificate", + "file": "privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_revoke_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.revoke_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RevokeCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.RevokeCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "revoke_certificate" + }, + "description": "Sample for RevokeCertificate", + "file": "privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_revoke_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.undelete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UndeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UndeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "undelete_certificate_authority" + }, + "description": "Sample for UndeleteCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.undelete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UndeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UndeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "undelete_certificate_authority" + }, + "description": "Sample for UndeleteCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_undelete_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.update_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCaPoolRequest" + }, + { + "name": "ca_pool", + "type": "google.cloud.security.privateca_v1.types.CaPool" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_ca_pool" + }, + "description": "Sample for UpdateCaPool", + "file": "privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_ca_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.update_ca_pool", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCaPool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCaPoolRequest" + }, + { + "name": "ca_pool", + "type": "google.cloud.security.privateca_v1.types.CaPool" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_ca_pool" + }, + "description": "Sample for UpdateCaPool", + "file": "privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_ca_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.update_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateAuthorityRequest" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1.types.CertificateAuthority" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_certificate_authority" + }, + "description": "Sample for UpdateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.update_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateAuthorityRequest" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1.types.CertificateAuthority" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_certificate_authority" + }, + "description": "Sample for UpdateCertificateAuthority", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.update_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateRevocationListRequest" + }, + { + "name": "certificate_revocation_list", + "type": "google.cloud.security.privateca_v1.types.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_certificate_revocation_list" + }, + "description": "Sample for UpdateCertificateRevocationList", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.update_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateRevocationListRequest" + }, + { + "name": "certificate_revocation_list", + "type": "google.cloud.security.privateca_v1.types.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_certificate_revocation_list" + }, + "description": "Sample for UpdateCertificateRevocationList", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.update_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateTemplateRequest" + }, + { + "name": "certificate_template", + "type": "google.cloud.security.privateca_v1.types.CertificateTemplate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_certificate_template" + }, + "description": "Sample for UpdateCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_template_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.update_certificate_template", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateTemplate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateTemplateRequest" + }, + { + "name": "certificate_template", + "type": "google.cloud.security.privateca_v1.types.CertificateTemplate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_certificate_template" + }, + "description": "Sample for UpdateCertificateTemplate", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_template_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceAsyncClient.update_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateRequest" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1.types.Certificate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "update_certificate" + }, + "description": "Sample for UpdateCertificate", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1.CertificateAuthorityServiceClient.update_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1.types.UpdateCertificateRequest" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1.types.Certificate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1.types.Certificate", + "shortName": "update_certificate" + }, + "description": "Sample for UpdateCertificate", + "file": "privateca_v1_generated_certificate_authority_service_update_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1_generated_certificate_authority_service_update_certificate_sync.py" + } + ] +} diff --git a/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1beta1.json new file mode 100644 index 000000000000..d9af1f5c993a --- /dev/null +++ b/packages/google-cloud-private-ca/samples/generated_samples/snippet_metadata_google.cloud.security.privateca.v1beta1.json @@ -0,0 +1,3291 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.security.privateca.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-private-ca", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.activate_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ActivateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ActivateCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "activate_certificate_authority" + }, + "description": "Sample for ActivateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.activate_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ActivateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ActivateCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "activate_certificate_authority" + }, + "description": "Sample for ActivateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_activate_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.create_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.CreateCertificateAuthorityRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority" + }, + { + "name": "certificate_authority_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_certificate_authority" + }, + "description": "Sample for CreateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "segments": [ + { + "end": 63, + "start": 27, + "type": "FULL" + }, + { + "end": 63, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 53, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 60, + "start": 54, + "type": "REQUEST_EXECUTION" + }, + { + "end": 64, + "start": 61, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.create_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.CreateCertificateAuthorityRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority" + }, + { + "name": "certificate_authority_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_certificate_authority" + }, + "description": "Sample for CreateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", + "segments": [ + { + "end": 63, + "start": 27, + "type": "FULL" + }, + { + "end": 63, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 53, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 60, + "start": 54, + "type": "REQUEST_EXECUTION" + }, + { + "end": 64, + "start": 61, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.create_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.CreateCertificateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1beta1.types.Certificate" + }, + { + "name": "certificate_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "create_certificate" + }, + "description": "Sample for CreateCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.create_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "CreateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.CreateCertificateRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1beta1.types.Certificate" + }, + { + "name": "certificate_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "create_certificate" + }, + "description": "Sample for CreateCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_create_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.disable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DisableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.DisableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "disable_certificate_authority" + }, + "description": "Sample for DisableCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.disable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "DisableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.DisableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "disable_certificate_authority" + }, + "description": "Sample for DisableCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_disable_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.enable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "EnableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.EnableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "enable_certificate_authority" + }, + "description": "Sample for EnableCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.enable_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "EnableCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.EnableCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "enable_certificate_authority" + }, + "description": "Sample for EnableCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_enable_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.fetch_certificate_authority_csr", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCertificateAuthorityCsr" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrResponse", + "shortName": "fetch_certificate_authority_csr" + }, + "description": "Sample for FetchCertificateAuthorityCsr", + "file": "privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.fetch_certificate_authority_csr", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "FetchCertificateAuthorityCsr" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrResponse", + "shortName": "fetch_certificate_authority_csr" + }, + "description": "Sample for FetchCertificateAuthorityCsr", + "file": "privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_fetch_certificate_authority_csr_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.get_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority", + "shortName": "get_certificate_authority" + }, + "description": "Sample for GetCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.get_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority", + "shortName": "get_certificate_authority" + }, + "description": "Sample for GetCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.get_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateRevocationListRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.CertificateRevocationList", + "shortName": "get_certificate_revocation_list" + }, + "description": "Sample for GetCertificateRevocationList", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.get_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateRevocationListRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.CertificateRevocationList", + "shortName": "get_certificate_revocation_list" + }, + "description": "Sample for GetCertificateRevocationList", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_revocation_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.get_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "get_certificate" + }, + "description": "Sample for GetCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.get_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "get_certificate" + }, + "description": "Sample for GetCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.get_reusable_config", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetReusableConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetReusableConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.ReusableConfig", + "shortName": "get_reusable_config" + }, + "description": "Sample for GetReusableConfig", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.get_reusable_config", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "GetReusableConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.GetReusableConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.ReusableConfig", + "shortName": "get_reusable_config" + }, + "description": "Sample for GetReusableConfig", + "file": "privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_get_reusable_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.list_certificate_authorities", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateAuthorities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificateAuthoritiesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager", + "shortName": "list_certificate_authorities" + }, + "description": "Sample for ListCertificateAuthorities", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.list_certificate_authorities", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateAuthorities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificateAuthoritiesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesPager", + "shortName": "list_certificate_authorities" + }, + "description": "Sample for ListCertificateAuthorities", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_authorities_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.list_certificate_revocation_lists", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateRevocationLists" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificateRevocationListsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager", + "shortName": "list_certificate_revocation_lists" + }, + "description": "Sample for ListCertificateRevocationLists", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.list_certificate_revocation_lists", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificateRevocationLists" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificateRevocationListsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateRevocationListsPager", + "shortName": "list_certificate_revocation_lists" + }, + "description": "Sample for ListCertificateRevocationLists", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificate_revocation_lists_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.list_certificates", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager", + "shortName": "list_certificates" + }, + "description": "Sample for ListCertificates", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificates_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.list_certificates", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListCertificates" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListCertificatesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificatesPager", + "shortName": "list_certificates" + }, + "description": "Sample for ListCertificates", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_certificates_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.list_reusable_configs", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListReusableConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListReusableConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListReusableConfigsAsyncPager", + "shortName": "list_reusable_configs" + }, + "description": "Sample for ListReusableConfigs", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.list_reusable_configs", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ListReusableConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ListReusableConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListReusableConfigsPager", + "shortName": "list_reusable_configs" + }, + "description": "Sample for ListReusableConfigs", + "file": "privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_list_reusable_configs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.restore_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RestoreCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.RestoreCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "restore_certificate_authority" + }, + "description": "Sample for RestoreCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.restore_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RestoreCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.RestoreCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "restore_certificate_authority" + }, + "description": "Sample for RestoreCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_restore_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.revoke_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RevokeCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.RevokeCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "revoke_certificate" + }, + "description": "Sample for RevokeCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.revoke_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "RevokeCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.RevokeCertificateRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "revoke_certificate" + }, + "description": "Sample for RevokeCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_revoke_certificate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.schedule_delete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ScheduleDeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ScheduleDeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "schedule_delete_certificate_authority" + }, + "description": "Sample for ScheduleDeleteCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.schedule_delete_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "ScheduleDeleteCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.ScheduleDeleteCertificateAuthorityRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "schedule_delete_certificate_authority" + }, + "description": "Sample for ScheduleDeleteCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_schedule_delete_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.update_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateAuthorityRequest" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_certificate_authority" + }, + "description": "Sample for UpdateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.update_certificate_authority", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateAuthority" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateAuthorityRequest" + }, + { + "name": "certificate_authority", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateAuthority" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_certificate_authority" + }, + "description": "Sample for UpdateCertificateAuthority", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_authority_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.update_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateRevocationListRequest" + }, + { + "name": "certificate_revocation_list", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_certificate_revocation_list" + }, + "description": "Sample for UpdateCertificateRevocationList", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.update_certificate_revocation_list", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificateRevocationList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateRevocationListRequest" + }, + { + "name": "certificate_revocation_list", + "type": "google.cloud.security.privateca_v1beta1.types.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_certificate_revocation_list" + }, + "description": "Sample for UpdateCertificateRevocationList", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_revocation_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient", + "shortName": "CertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceAsyncClient.update_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateRequest" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1beta1.types.Certificate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "update_certificate" + }, + "description": "Sample for UpdateCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient", + "shortName": "CertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.privateca_v1beta1.CertificateAuthorityServiceClient.update_certificate", + "method": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "service": { + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService", + "shortName": "CertificateAuthorityService" + }, + "shortName": "UpdateCertificate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.privateca_v1beta1.types.UpdateCertificateRequest" + }, + { + "name": "certificate", + "type": "google.cloud.security.privateca_v1beta1.types.Certificate" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.privateca_v1beta1.types.Certificate", + "shortName": "update_certificate" + }, + "description": "Sample for UpdateCertificate", + "file": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "privateca_v1beta1_generated_certificate_authority_service_update_certificate_sync.py" + } + ] +} diff --git a/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1/test_certificate_authority_service.py b/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1/test_certificate_authority_service.py index 97631d61f8d2..3559e5982fd8 100644 --- a/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1/test_certificate_authority_service.py +++ b/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1/test_certificate_authority_service.py @@ -1754,9 +1754,11 @@ async def test_list_certificates_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificates(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4242,9 +4244,11 @@ async def test_list_certificate_authorities_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificate_authorities(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6113,9 +6117,11 @@ async def test_list_ca_pools_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_ca_pools(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7281,9 +7287,11 @@ async def test_list_certificate_revocation_lists_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificate_revocation_lists(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8739,9 +8747,11 @@ async def test_list_certificate_templates_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificate_templates(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1beta1/test_certificate_authority_service.py b/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1beta1/test_certificate_authority_service.py index af7a3b9f5150..fc9fb52e20c6 100644 --- a/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1beta1/test_certificate_authority_service.py +++ b/packages/google-cloud-private-ca/tests/unit/gapic/privateca_v1beta1/test_certificate_authority_service.py @@ -1725,9 +1725,11 @@ async def test_list_certificates_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificates(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4189,9 +4191,11 @@ async def test_list_certificate_authorities_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificate_authorities(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5634,9 +5638,11 @@ async def test_list_certificate_revocation_lists_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_certificate_revocation_lists(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6589,9 +6595,11 @@ async def test_list_reusable_configs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_reusable_configs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-private-catalog/google/cloud/privatecatalog/gapic_version.py b/packages/google-cloud-private-catalog/google/cloud/privatecatalog/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-private-catalog/google/cloud/privatecatalog/gapic_version.py +++ b/packages/google-cloud-private-catalog/google/cloud/privatecatalog/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/gapic_version.py b/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/gapic_version.py +++ b/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/services/private_catalog/async_client.py b/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/services/private_catalog/async_client.py index fcaa988e2b89..e7122a820224 100644 --- a/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/services/private_catalog/async_client.py +++ b/packages/google-cloud-private-catalog/google/cloud/privatecatalog_v1beta1/services/private_catalog/async_client.py @@ -526,7 +526,7 @@ async def sample_search_versions(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PrivateCatalogAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-private-catalog/noxfile.py b/packages/google-cloud-private-catalog/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-private-catalog/noxfile.py +++ b/packages/google-cloud-private-catalog/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py new file mode 100644 index 000000000000..514b20084633 --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchCatalogs +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +async def sample_search_catalogs(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogAsyncClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchCatalogsRequest( + resource="resource_value", + ) + + # Make the request + page_result = client.search_catalogs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_async] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py new file mode 100644 index 000000000000..52a85a10d71c --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchCatalogs +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +def sample_search_catalogs(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchCatalogsRequest( + resource="resource_value", + ) + + # Make the request + page_result = client.search_catalogs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_sync] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py new file mode 100644 index 000000000000..7add759aa6ed --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchProducts +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +async def sample_search_products(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogAsyncClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchProductsRequest( + resource="resource_value", + ) + + # Make the request + page_result = client.search_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_async] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py new file mode 100644 index 000000000000..b62294d5865a --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchProducts +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +def sample_search_products(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchProductsRequest( + resource="resource_value", + ) + + # Make the request + page_result = client.search_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_sync] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py new file mode 100644 index 000000000000..a7a8037b200c --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchVersions +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +async def sample_search_versions(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogAsyncClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchVersionsRequest( + resource="resource_value", + query="query_value", + ) + + # Make the request + page_result = client.search_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_async] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py new file mode 100644 index 000000000000..5a3215dd4d66 --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchVersions +# 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-private-catalog + + +# [START cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import privatecatalog_v1beta1 + + +def sample_search_versions(): + # Create a client + client = privatecatalog_v1beta1.PrivateCatalogClient() + + # Initialize request argument(s) + request = privatecatalog_v1beta1.SearchVersionsRequest( + resource="resource_value", + query="query_value", + ) + + # Make the request + page_result = client.search_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_sync] diff --git a/packages/google-cloud-private-catalog/samples/generated_samples/snippet_metadata_google.cloud.privatecatalog.v1beta1.json b/packages/google-cloud-private-catalog/samples/generated_samples/snippet_metadata_google.cloud.privatecatalog.v1beta1.json new file mode 100644 index 000000000000..cc341df83810 --- /dev/null +++ b/packages/google-cloud-private-catalog/samples/generated_samples/snippet_metadata_google.cloud.privatecatalog.v1beta1.json @@ -0,0 +1,474 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.privatecatalog.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-private-catalog", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient", + "shortName": "PrivateCatalogAsyncClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient.search_catalogs", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchCatalogs", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchCatalogsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchCatalogsAsyncPager", + "shortName": "search_catalogs" + }, + "description": "Sample for SearchCatalogs", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient", + "shortName": "PrivateCatalogClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient.search_catalogs", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchCatalogs", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchCatalogsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchCatalogsPager", + "shortName": "search_catalogs" + }, + "description": "Sample for SearchCatalogs", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchCatalogs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_catalogs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient", + "shortName": "PrivateCatalogAsyncClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient.search_products", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchProducts", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchProductsAsyncPager", + "shortName": "search_products" + }, + "description": "Sample for SearchProducts", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient", + "shortName": "PrivateCatalogClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient.search_products", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchProducts", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchProductsPager", + "shortName": "search_products" + }, + "description": "Sample for SearchProducts", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchProducts_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient", + "shortName": "PrivateCatalogAsyncClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogAsyncClient.search_versions", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchVersions", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchVersionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchVersionsAsyncPager", + "shortName": "search_versions" + }, + "description": "Sample for SearchVersions", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient", + "shortName": "PrivateCatalogClient" + }, + "fullName": "google.cloud.privatecatalog_v1beta1.PrivateCatalogClient.search_versions", + "method": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog.SearchVersions", + "service": { + "fullName": "google.cloud.privatecatalog.v1beta1.PrivateCatalog", + "shortName": "PrivateCatalog" + }, + "shortName": "SearchVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.privatecatalog_v1beta1.types.SearchVersionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.privatecatalog_v1beta1.services.private_catalog.pagers.SearchVersionsPager", + "shortName": "search_versions" + }, + "description": "Sample for SearchVersions", + "file": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudprivatecatalog_v1beta1_generated_PrivateCatalog_SearchVersions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudprivatecatalog_v1beta1_generated_private_catalog_search_versions_sync.py" + } + ] +} diff --git a/packages/google-cloud-private-catalog/tests/unit/gapic/privatecatalog_v1beta1/test_private_catalog.py b/packages/google-cloud-private-catalog/tests/unit/gapic/privatecatalog_v1beta1/test_private_catalog.py index bd357afed8c2..052506b2b37a 100644 --- a/packages/google-cloud-private-catalog/tests/unit/gapic/privatecatalog_v1beta1/test_private_catalog.py +++ b/packages/google-cloud-private-catalog/tests/unit/gapic/privatecatalog_v1beta1/test_private_catalog.py @@ -1032,9 +1032,11 @@ async def test_search_catalogs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_catalogs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1370,9 +1372,11 @@ async def test_search_products_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_products(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1708,9 +1712,11 @@ async def test_search_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-public-ca/google/cloud/security/publicca/gapic_version.py b/packages/google-cloud-public-ca/google/cloud/security/publicca/gapic_version.py index 4b200d0e705c..30274cc6e9dd 100644 --- a/packages/google-cloud-public-ca/google/cloud/security/publicca/gapic_version.py +++ b/packages/google-cloud-public-ca/google/cloud/security/publicca/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/gapic_version.py b/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/gapic_version.py index 4b200d0e705c..30274cc6e9dd 100644 --- a/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/gapic_version.py +++ b/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/services/public_certificate_authority_service/async_client.py b/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/services/public_certificate_authority_service/async_client.py index df1571fb8a03..4fdf30b256a4 100644 --- a/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/services/public_certificate_authority_service/async_client.py +++ b/packages/google-cloud-public-ca/google/cloud/security/publicca_v1beta1/services/public_certificate_authority_service/async_client.py @@ -360,7 +360,7 @@ async def sample_create_external_account_key(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PublicCertificateAuthorityServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-public-ca/noxfile.py b/packages/google-cloud-public-ca/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-public-ca/noxfile.py +++ b/packages/google-cloud-public-ca/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py b/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py new file mode 100644 index 000000000000..20a79ffbce01 --- /dev/null +++ b/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateExternalAccountKey +# 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-public-ca + + +# [START publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import publicca_v1beta1 + + +async def sample_create_external_account_key(): + # Create a client + client = publicca_v1beta1.PublicCertificateAuthorityServiceAsyncClient() + + # Initialize request argument(s) + request = publicca_v1beta1.CreateExternalAccountKeyRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_external_account_key(request=request) + + # Handle the response + print(response) + +# [END publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_async] diff --git a/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py b/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py new file mode 100644 index 000000000000..0262d96d7954 --- /dev/null +++ b/packages/google-cloud-public-ca/samples/generated_samples/publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateExternalAccountKey +# 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-public-ca + + +# [START publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud.security import publicca_v1beta1 + + +def sample_create_external_account_key(): + # Create a client + client = publicca_v1beta1.PublicCertificateAuthorityServiceClient() + + # Initialize request argument(s) + request = publicca_v1beta1.CreateExternalAccountKeyRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_external_account_key(request=request) + + # Handle the response + print(response) + +# [END publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_sync] diff --git a/packages/google-cloud-public-ca/samples/generated_samples/snippet_metadata_google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-public-ca/samples/generated_samples/snippet_metadata_google.cloud.security.publicca.v1beta1.json new file mode 100644 index 000000000000..b4590ffb004f --- /dev/null +++ b/packages/google-cloud-public-ca/samples/generated_samples/snippet_metadata_google.cloud.security.publicca.v1beta1.json @@ -0,0 +1,184 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.security.publicca.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-public-ca", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.security.publicca_v1beta1.PublicCertificateAuthorityServiceAsyncClient", + "shortName": "PublicCertificateAuthorityServiceAsyncClient" + }, + "fullName": "google.cloud.security.publicca_v1beta1.PublicCertificateAuthorityServiceAsyncClient.create_external_account_key", + "method": { + "fullName": "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService.CreateExternalAccountKey", + "service": { + "fullName": "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService", + "shortName": "PublicCertificateAuthorityService" + }, + "shortName": "CreateExternalAccountKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.publicca_v1beta1.types.CreateExternalAccountKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "external_account_key", + "type": "google.cloud.security.publicca_v1beta1.types.ExternalAccountKey" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.publicca_v1beta1.types.ExternalAccountKey", + "shortName": "create_external_account_key" + }, + "description": "Sample for CreateExternalAccountKey", + "file": "publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.security.publicca_v1beta1.PublicCertificateAuthorityServiceClient", + "shortName": "PublicCertificateAuthorityServiceClient" + }, + "fullName": "google.cloud.security.publicca_v1beta1.PublicCertificateAuthorityServiceClient.create_external_account_key", + "method": { + "fullName": "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService.CreateExternalAccountKey", + "service": { + "fullName": "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService", + "shortName": "PublicCertificateAuthorityService" + }, + "shortName": "CreateExternalAccountKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.security.publicca_v1beta1.types.CreateExternalAccountKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "external_account_key", + "type": "google.cloud.security.publicca_v1beta1.types.ExternalAccountKey" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.security.publicca_v1beta1.types.ExternalAccountKey", + "shortName": "create_external_account_key" + }, + "description": "Sample for CreateExternalAccountKey", + "file": "publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "publicca_v1beta1_generated_public_certificate_authority_service_create_external_account_key_sync.py" + } + ] +} diff --git a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment/gapic_version.py b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment/gapic_version.py +++ b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/gapic_version.py b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/gapic_version.py +++ b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/async_client.py b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/async_client.py index e78e6632de5e..251fbd75dad5 100644 --- a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/async_client.py +++ b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/async_client.py @@ -1769,7 +1769,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RapidMigrationAssessmentAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/transports/rest.py b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/transports/rest.py index a9dabc884931..f68aac679e1c 100644 --- a/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/transports/rest.py +++ b/packages/google-cloud-rapidmigrationassessment/google/cloud/rapidmigrationassessment_v1/services/rapid_migration_assessment/transports/rest.py @@ -1912,7 +1912,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-rapidmigrationassessment/noxfile.py b/packages/google-cloud-rapidmigrationassessment/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-rapidmigrationassessment/noxfile.py +++ b/packages/google-cloud-rapidmigrationassessment/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-rapidmigrationassessment/tests/unit/gapic/rapidmigrationassessment_v1/test_rapid_migration_assessment.py b/packages/google-cloud-rapidmigrationassessment/tests/unit/gapic/rapidmigrationassessment_v1/test_rapid_migration_assessment.py index aa13435ab1a0..c6548fb15538 100644 --- a/packages/google-cloud-rapidmigrationassessment/tests/unit/gapic/rapidmigrationassessment_v1/test_rapid_migration_assessment.py +++ b/packages/google-cloud-rapidmigrationassessment/tests/unit/gapic/rapidmigrationassessment_v1/test_rapid_migration_assessment.py @@ -1923,9 +1923,11 @@ async def test_list_collectors_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_collectors(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise/gapic_version.py b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise/gapic_version.py index 7138f2147532..30274cc6e9dd 100644 --- a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise/gapic_version.py +++ b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.12.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/gapic_version.py b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/gapic_version.py index 7138f2147532..30274cc6e9dd 100644 --- a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/gapic_version.py +++ b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.12.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/async_client.py b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/async_client.py index 30ec9c7d7434..aa9eb863bbe3 100644 --- a/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/async_client.py +++ b/packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/async_client.py @@ -1688,7 +1688,7 @@ async def sample_search_related_account_group_memberships(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RecaptchaEnterpriseServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recaptcha-enterprise/noxfile.py b/packages/google-cloud-recaptcha-enterprise/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-recaptcha-enterprise/noxfile.py +++ b/packages/google-cloud-recaptcha-enterprise/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py new file mode 100644 index 000000000000..c90368942416 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AnnotateAssessment +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_annotate_assessment(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.AnnotateAssessmentRequest( + name="name_value", + ) + + # Make the request + response = await client.annotate_assessment(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py new file mode 100644 index 000000000000..0de2446da37b --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AnnotateAssessment +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_annotate_assessment(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.AnnotateAssessmentRequest( + name="name_value", + ) + + # Make the request + response = client.annotate_assessment(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py new file mode 100644 index 000000000000..81d548c885bd --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAssessment +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_create_assessment(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.CreateAssessmentRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_assessment(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py new file mode 100644 index 000000000000..6cadb97d6f3a --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateAssessment +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_create_assessment(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.CreateAssessmentRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_assessment(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py new file mode 100644 index 000000000000..1ce14bf632f9 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_create_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + key = recaptchaenterprise_v1.Key() + key.web_settings.integration_type = "INVISIBLE" + + request = recaptchaenterprise_v1.CreateKeyRequest( + parent="parent_value", + key=key, + ) + + # Make the request + response = await client.create_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py new file mode 100644 index 000000000000..b989397fb11a --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_create_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + key = recaptchaenterprise_v1.Key() + key.web_settings.integration_type = "INVISIBLE" + + request = recaptchaenterprise_v1.CreateKeyRequest( + parent="parent_value", + key=key, + ) + + # Make the request + response = client.create_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py new file mode 100644 index 000000000000..cc6c5358f5d2 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_delete_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.DeleteKeyRequest( + name="name_value", + ) + + # Make the request + await client.delete_key(request=request) + + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py new file mode 100644 index 000000000000..78a87818b9f4 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_delete_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.DeleteKeyRequest( + name="name_value", + ) + + # Make the request + client.delete_key(request=request) + + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py new file mode 100644 index 000000000000..077d790192d5 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_get_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.GetKeyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py new file mode 100644 index 000000000000..8dee0f82a2fb --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_get_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.GetKeyRequest( + name="name_value", + ) + + # Make the request + response = client.get_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py new file mode 100644 index 000000000000..fbd89eaedc01 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetMetrics +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_get_metrics(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.GetMetricsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_metrics(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py new file mode 100644 index 000000000000..0a1c13b438b5 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetMetrics +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_get_metrics(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.GetMetricsRequest( + name="name_value", + ) + + # Make the request + response = client.get_metrics(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py new file mode 100644 index 000000000000..f296b28f7b66 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListKeys +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_list_keys(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_keys(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py new file mode 100644 index 000000000000..b0886b4c002f --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListKeys +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_list_keys(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_keys(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py new file mode 100644 index 000000000000..84d380a8913f --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRelatedAccountGroupMemberships +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_list_related_account_group_memberships(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListRelatedAccountGroupMembershipsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_related_account_group_memberships(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py new file mode 100644 index 000000000000..35b366a99fe0 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRelatedAccountGroupMemberships +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_list_related_account_group_memberships(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListRelatedAccountGroupMembershipsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_related_account_group_memberships(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py new file mode 100644 index 000000000000..7e3b0701fa58 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRelatedAccountGroups +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_list_related_account_groups(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListRelatedAccountGroupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_related_account_groups(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py new file mode 100644 index 000000000000..ae325052b517 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRelatedAccountGroups +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_list_related_account_groups(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.ListRelatedAccountGroupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_related_account_groups(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py new file mode 100644 index 000000000000..1559c00c2875 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MigrateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_migrate_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.MigrateKeyRequest( + name="name_value", + ) + + # Make the request + response = await client.migrate_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py new file mode 100644 index 000000000000..731ce3374b04 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MigrateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_migrate_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.MigrateKeyRequest( + name="name_value", + ) + + # Make the request + response = client.migrate_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py new file mode 100644 index 000000000000..23e9e9a24dfd --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RetrieveLegacySecretKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_retrieve_legacy_secret_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.RetrieveLegacySecretKeyRequest( + key="key_value", + ) + + # Make the request + response = await client.retrieve_legacy_secret_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py new file mode 100644 index 000000000000..74fd8a118868 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RetrieveLegacySecretKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_retrieve_legacy_secret_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.RetrieveLegacySecretKeyRequest( + key="key_value", + ) + + # Make the request + response = client.retrieve_legacy_secret_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py new file mode 100644 index 000000000000..e84bcda0370a --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchRelatedAccountGroupMemberships +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_search_related_account_group_memberships(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.SearchRelatedAccountGroupMembershipsRequest( + project="project_value", + ) + + # Make the request + page_result = client.search_related_account_group_memberships(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py new file mode 100644 index 000000000000..f9151a1830cb --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchRelatedAccountGroupMemberships +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_search_related_account_group_memberships(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + request = recaptchaenterprise_v1.SearchRelatedAccountGroupMembershipsRequest( + project="project_value", + ) + + # Make the request + page_result = client.search_related_account_group_memberships(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py new file mode 100644 index 000000000000..1123d5777f9e --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +async def sample_update_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient() + + # Initialize request argument(s) + key = recaptchaenterprise_v1.Key() + key.web_settings.integration_type = "INVISIBLE" + + request = recaptchaenterprise_v1.UpdateKeyRequest( + key=key, + ) + + # Make the request + response = await client.update_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_async] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py new file mode 100644 index 000000000000..521208f84917 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateKey +# 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-recaptcha-enterprise + + +# [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recaptchaenterprise_v1 + + +def sample_update_key(): + # Create a client + client = recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient() + + # Initialize request argument(s) + key = recaptchaenterprise_v1.Key() + key.web_settings.integration_type = "INVISIBLE" + + request = recaptchaenterprise_v1.UpdateKeyRequest( + key=key, + ) + + # Make the request + response = client.update_key(request=request) + + # Handle the response + print(response) + +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/snippet_metadata_google.cloud.recaptchaenterprise.v1.json b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/snippet_metadata_google.cloud.recaptchaenterprise.v1.json new file mode 100644 index 000000000000..f229f1b38859 --- /dev/null +++ b/packages/google-cloud-recaptcha-enterprise/samples/generated_samples/snippet_metadata_google.cloud.recaptchaenterprise.v1.json @@ -0,0 +1,2134 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.recaptchaenterprise.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-recaptcha-enterprise", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.annotate_assessment", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessment", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "AnnotateAssessment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "annotation", + "type": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest.Annotation" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentResponse", + "shortName": "annotate_assessment" + }, + "description": "Sample for AnnotateAssessment", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.annotate_assessment", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessment", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "AnnotateAssessment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "annotation", + "type": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest.Annotation" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentResponse", + "shortName": "annotate_assessment" + }, + "description": "Sample for AnnotateAssessment", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_annotate_assessment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.create_assessment", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessment", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "CreateAssessment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.CreateAssessmentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "assessment", + "type": "google.cloud.recaptchaenterprise_v1.types.Assessment" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Assessment", + "shortName": "create_assessment" + }, + "description": "Sample for CreateAssessment", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.create_assessment", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessment", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "CreateAssessment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.CreateAssessmentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "assessment", + "type": "google.cloud.recaptchaenterprise_v1.types.Assessment" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Assessment", + "shortName": "create_assessment" + }, + "description": "Sample for CreateAssessment", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_assessment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.create_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "CreateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.CreateKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "key", + "type": "google.cloud.recaptchaenterprise_v1.types.Key" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "create_key" + }, + "description": "Sample for CreateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.create_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "CreateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.CreateKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "key", + "type": "google.cloud.recaptchaenterprise_v1.types.Key" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "create_key" + }, + "description": "Sample for CreateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_create_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.delete_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "DeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.DeleteKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_key" + }, + "description": "Sample for DeleteKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.delete_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "DeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.DeleteKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_key" + }, + "description": "Sample for DeleteKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_delete_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.get_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "GetKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.GetKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "get_key" + }, + "description": "Sample for GetKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.get_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "GetKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.GetKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "get_key" + }, + "description": "Sample for GetKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.get_metrics", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetrics", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "GetMetrics" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.GetMetricsRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Metrics", + "shortName": "get_metrics" + }, + "description": "Sample for GetMetrics", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.get_metrics", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetrics", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "GetMetrics" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.GetMetricsRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Metrics", + "shortName": "get_metrics" + }, + "description": "Sample for GetMetrics", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_get_metrics_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.list_keys", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeys", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListKeysAsyncPager", + "shortName": "list_keys" + }, + "description": "Sample for ListKeys", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.list_keys", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeys", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListKeysPager", + "shortName": "list_keys" + }, + "description": "Sample for ListKeys", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_keys_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.list_related_account_group_memberships", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMemberships", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListRelatedAccountGroupMemberships" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListRelatedAccountGroupMembershipsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListRelatedAccountGroupMembershipsAsyncPager", + "shortName": "list_related_account_group_memberships" + }, + "description": "Sample for ListRelatedAccountGroupMemberships", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.list_related_account_group_memberships", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMemberships", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListRelatedAccountGroupMemberships" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListRelatedAccountGroupMembershipsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListRelatedAccountGroupMembershipsPager", + "shortName": "list_related_account_group_memberships" + }, + "description": "Sample for ListRelatedAccountGroupMemberships", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_group_memberships_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.list_related_account_groups", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroups", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListRelatedAccountGroups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListRelatedAccountGroupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListRelatedAccountGroupsAsyncPager", + "shortName": "list_related_account_groups" + }, + "description": "Sample for ListRelatedAccountGroups", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.list_related_account_groups", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroups", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "ListRelatedAccountGroups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.ListRelatedAccountGroupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.ListRelatedAccountGroupsPager", + "shortName": "list_related_account_groups" + }, + "description": "Sample for ListRelatedAccountGroups", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_list_related_account_groups_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.migrate_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "MigrateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.MigrateKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "migrate_key" + }, + "description": "Sample for MigrateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.migrate_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "MigrateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.MigrateKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "migrate_key" + }, + "description": "Sample for MigrateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_migrate_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.retrieve_legacy_secret_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "RetrieveLegacySecretKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.RetrieveLegacySecretKeyRequest" + }, + { + "name": "key", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.RetrieveLegacySecretKeyResponse", + "shortName": "retrieve_legacy_secret_key" + }, + "description": "Sample for RetrieveLegacySecretKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.retrieve_legacy_secret_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "RetrieveLegacySecretKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.RetrieveLegacySecretKeyRequest" + }, + { + "name": "key", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.RetrieveLegacySecretKeyResponse", + "shortName": "retrieve_legacy_secret_key" + }, + "description": "Sample for RetrieveLegacySecretKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_retrieve_legacy_secret_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.search_related_account_group_memberships", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMemberships", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "SearchRelatedAccountGroupMemberships" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.SearchRelatedAccountGroupMembershipsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "hashed_account_id", + "type": "bytes" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.SearchRelatedAccountGroupMembershipsAsyncPager", + "shortName": "search_related_account_group_memberships" + }, + "description": "Sample for SearchRelatedAccountGroupMemberships", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.search_related_account_group_memberships", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMemberships", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "SearchRelatedAccountGroupMemberships" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.SearchRelatedAccountGroupMembershipsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "hashed_account_id", + "type": "bytes" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers.SearchRelatedAccountGroupMembershipsPager", + "shortName": "search_related_account_group_memberships" + }, + "description": "Sample for SearchRelatedAccountGroupMemberships", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_search_related_account_group_memberships_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient", + "shortName": "RecaptchaEnterpriseServiceAsyncClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceAsyncClient.update_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "UpdateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.UpdateKeyRequest" + }, + { + "name": "key", + "type": "google.cloud.recaptchaenterprise_v1.types.Key" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "update_key" + }, + "description": "Sample for UpdateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient", + "shortName": "RecaptchaEnterpriseServiceClient" + }, + "fullName": "google.cloud.recaptchaenterprise_v1.RecaptchaEnterpriseServiceClient.update_key", + "method": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKey", + "service": { + "fullName": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "shortName": "RecaptchaEnterpriseService" + }, + "shortName": "UpdateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recaptchaenterprise_v1.types.UpdateKeyRequest" + }, + { + "name": "key", + "type": "google.cloud.recaptchaenterprise_v1.types.Key" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recaptchaenterprise_v1.types.Key", + "shortName": "update_key" + }, + "description": "Sample for UpdateKey", + "file": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recaptchaenterprise_v1_generated_recaptcha_enterprise_service_update_key_sync.py" + } + ] +} diff --git a/packages/google-cloud-recaptcha-enterprise/tests/unit/gapic/recaptchaenterprise_v1/test_recaptcha_enterprise_service.py b/packages/google-cloud-recaptcha-enterprise/tests/unit/gapic/recaptchaenterprise_v1/test_recaptcha_enterprise_service.py index 40968e184629..05557970deb8 100644 --- a/packages/google-cloud-recaptcha-enterprise/tests/unit/gapic/recaptchaenterprise_v1/test_recaptcha_enterprise_service.py +++ b/packages/google-cloud-recaptcha-enterprise/tests/unit/gapic/recaptchaenterprise_v1/test_recaptcha_enterprise_service.py @@ -1245,7 +1245,6 @@ def test_create_key(request_type, transport: str = "grpc"): call.return_value = recaptchaenterprise.Key( name="name_value", display_name="display_name_value", - web_settings=recaptchaenterprise.WebKeySettings(allow_all_domains=True), ) response = client.create_key(request) @@ -1881,9 +1880,11 @@ async def test_list_keys_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_keys(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2159,7 +2160,6 @@ def test_get_key(request_type, transport: str = "grpc"): call.return_value = recaptchaenterprise.Key( name="name_value", display_name="display_name_value", - web_settings=recaptchaenterprise.WebKeySettings(allow_all_domains=True), ) response = client.get_key(request) @@ -2396,7 +2396,6 @@ def test_update_key(request_type, transport: str = "grpc"): call.return_value = recaptchaenterprise.Key( name="name_value", display_name="display_name_value", - web_settings=recaptchaenterprise.WebKeySettings(allow_all_domains=True), ) response = client.update_key(request) @@ -2863,7 +2862,6 @@ def test_migrate_key(request_type, transport: str = "grpc"): call.return_value = recaptchaenterprise.Key( name="name_value", display_name="display_name_value", - web_settings=recaptchaenterprise.WebKeySettings(allow_all_domains=True), ) response = client.migrate_key(request) @@ -3666,9 +3664,11 @@ async def test_list_related_account_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_related_account_groups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4129,9 +4129,11 @@ async def test_list_related_account_group_memberships_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_related_account_group_memberships(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4604,9 +4606,11 @@ async def test_search_related_account_group_memberships_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_related_account_group_memberships(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine/gapic_version.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine/gapic_version.py index 1f045a294ec1..30274cc6e9dd 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine/gapic_version.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.10.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/gapic_version.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/gapic_version.py index 1f045a294ec1..30274cc6e9dd 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/gapic_version.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.10.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/catalog_service/async_client.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/catalog_service/async_client.py index f0f4a9b515ca..b21c50b1c22e 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/catalog_service/async_client.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/catalog_service/async_client.py @@ -1011,7 +1011,7 @@ async def sample_import_catalog_items(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CatalogServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_api_key_registry/async_client.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_api_key_registry/async_client.py index ba4d05d18533..432117d0bd6a 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_api_key_registry/async_client.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_api_key_registry/async_client.py @@ -609,7 +609,7 @@ async def sample_delete_prediction_api_key_registration(): metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "PredictionApiKeyRegistryAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_service/async_client.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_service/async_client.py index 5d9b6b8d3364..5e34fb45c326 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_service/async_client.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/prediction_service/async_client.py @@ -397,7 +397,7 @@ async def sample_predict(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PredictionServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/user_event_service/async_client.py b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/user_event_service/async_client.py index 9d873ab75b92..47a02d5c4909 100644 --- a/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/user_event_service/async_client.py +++ b/packages/google-cloud-recommendations-ai/google/cloud/recommendationengine_v1beta1/services/user_event_service/async_client.py @@ -1070,7 +1070,7 @@ async def sample_import_user_events(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "UserEventServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommendations-ai/noxfile.py b/packages/google-cloud-recommendations-ai/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-recommendations-ai/noxfile.py +++ b/packages/google-cloud-recommendations-ai/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py new file mode 100644 index 000000000000..e1310b62a2d2 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_create_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_item = recommendationengine_v1beta1.CatalogItem() + catalog_item.id = "id_value" + catalog_item.category_hierarchies.categories = ['categories_value1', 'categories_value2'] + catalog_item.title = "title_value" + + request = recommendationengine_v1beta1.CreateCatalogItemRequest( + parent="parent_value", + catalog_item=catalog_item, + ) + + # Make the request + response = await client.create_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py new file mode 100644 index 000000000000..53f10713a27d --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_create_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + catalog_item = recommendationengine_v1beta1.CatalogItem() + catalog_item.id = "id_value" + catalog_item.category_hierarchies.categories = ['categories_value1', 'categories_value2'] + catalog_item.title = "title_value" + + request = recommendationengine_v1beta1.CreateCatalogItemRequest( + parent="parent_value", + catalog_item=catalog_item, + ) + + # Make the request + response = client.create_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py new file mode 100644 index 000000000000..850f6c0111e1 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_delete_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.DeleteCatalogItemRequest( + name="name_value", + ) + + # Make the request + await client.delete_catalog_item(request=request) + + +# [END recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py new file mode 100644 index 000000000000..849c942942d8 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_delete_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.DeleteCatalogItemRequest( + name="name_value", + ) + + # Make the request + client.delete_catalog_item(request=request) + + +# [END recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py new file mode 100644 index 000000000000..523b166cfd5e --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_get_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.GetCatalogItemRequest( + name="name_value", + ) + + # Make the request + response = await client.get_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py new file mode 100644 index 000000000000..770e06793497 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_get_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.GetCatalogItemRequest( + name="name_value", + ) + + # Make the request + response = client.get_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py new file mode 100644 index 000000000000..d8572aa7bd08 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportCatalogItems +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_import_catalog_items(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ImportCatalogItemsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_catalog_items(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py new file mode 100644 index 000000000000..6091ccc0b640 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportCatalogItems +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_import_catalog_items(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ImportCatalogItemsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_catalog_items(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py new file mode 100644 index 000000000000..0c04997e2d87 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCatalogItems +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_list_catalog_items(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListCatalogItemsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_catalog_items(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py new file mode 100644 index 000000000000..ca082bfd4e80 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListCatalogItems +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_list_catalog_items(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListCatalogItemsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_catalog_items(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py new file mode 100644 index 000000000000..1c1cc93facd7 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_update_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_item = recommendationengine_v1beta1.CatalogItem() + catalog_item.id = "id_value" + catalog_item.category_hierarchies.categories = ['categories_value1', 'categories_value2'] + catalog_item.title = "title_value" + + request = recommendationengine_v1beta1.UpdateCatalogItemRequest( + name="name_value", + catalog_item=catalog_item, + ) + + # Make the request + response = await client.update_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py new file mode 100644 index 000000000000..e3699cbdc5cb --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateCatalogItem +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_update_catalog_item(): + # Create a client + client = recommendationengine_v1beta1.CatalogServiceClient() + + # Initialize request argument(s) + catalog_item = recommendationengine_v1beta1.CatalogItem() + catalog_item.id = "id_value" + catalog_item.category_hierarchies.categories = ['categories_value1', 'categories_value2'] + catalog_item.title = "title_value" + + request = recommendationengine_v1beta1.UpdateCatalogItemRequest( + name="name_value", + catalog_item=catalog_item, + ) + + # Make the request + response = client.update_catalog_item(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py new file mode 100644 index 000000000000..30217d472e94 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreatePredictionApiKeyRegistration +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_create_prediction_api_key_registration(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.CreatePredictionApiKeyRegistrationRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_prediction_api_key_registration(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py new file mode 100644 index 000000000000..f49cae82b8ac --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreatePredictionApiKeyRegistration +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_create_prediction_api_key_registration(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.CreatePredictionApiKeyRegistrationRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_prediction_api_key_registration(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py new file mode 100644 index 000000000000..83b7fe64a5ea --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeletePredictionApiKeyRegistration +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_delete_prediction_api_key_registration(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.DeletePredictionApiKeyRegistrationRequest( + name="name_value", + ) + + # Make the request + await client.delete_prediction_api_key_registration(request=request) + + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py new file mode 100644 index 000000000000..21860810cc01 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeletePredictionApiKeyRegistration +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_delete_prediction_api_key_registration(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.DeletePredictionApiKeyRegistrationRequest( + name="name_value", + ) + + # Make the request + client.delete_prediction_api_key_registration(request=request) + + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py new file mode 100644 index 000000000000..08b737a91a09 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListPredictionApiKeyRegistrations +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_list_prediction_api_key_registrations(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListPredictionApiKeyRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_prediction_api_key_registrations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py new file mode 100644 index 000000000000..fca8f902d564 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListPredictionApiKeyRegistrations +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_list_prediction_api_key_registrations(): + # Create a client + client = recommendationengine_v1beta1.PredictionApiKeyRegistryClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListPredictionApiKeyRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_prediction_api_key_registrations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_async.py new file mode 100644 index 000000000000..4f4ba0a70d24 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Predict +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionService_Predict_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_predict(): + # Create a client + client = recommendationengine_v1beta1.PredictionServiceAsyncClient() + + # Initialize request argument(s) + user_event = recommendationengine_v1beta1.UserEvent() + user_event.event_type = "event_type_value" + user_event.user_info.visitor_id = "visitor_id_value" + + request = recommendationengine_v1beta1.PredictRequest( + name="name_value", + user_event=user_event, + ) + + # Make the request + page_result = client.predict(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionService_Predict_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_sync.py new file mode 100644 index 000000000000..1f9ddd353cf7 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_prediction_service_predict_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Predict +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_PredictionService_Predict_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_predict(): + # Create a client + client = recommendationengine_v1beta1.PredictionServiceClient() + + # Initialize request argument(s) + user_event = recommendationengine_v1beta1.UserEvent() + user_event.event_type = "event_type_value" + user_event.user_info.visitor_id = "visitor_id_value" + + request = recommendationengine_v1beta1.PredictRequest( + name="name_value", + user_event=user_event, + ) + + # Make the request + page_result = client.predict(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_PredictionService_Predict_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py new file mode 100644 index 000000000000..6e440f1b1a30 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CollectUserEvent +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_collect_user_event(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = await client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py new file mode 100644 index 000000000000..5ba6c4e744b5 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CollectUserEvent +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_collect_user_event(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py new file mode 100644 index 000000000000..ed7bfd236f17 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_import_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ImportUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py new file mode 100644 index 000000000000..00537a62b862 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_import_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ImportUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py new file mode 100644 index 000000000000..3c77075239f8 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_list_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListUserEventsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_user_events(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py new file mode 100644 index 000000000000..bf8be4830882 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_list_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.ListUserEventsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_user_events(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py new file mode 100644 index 000000000000..f4de64022a77 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PurgeUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_purge_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py new file mode 100644 index 000000000000..76e415f443d9 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PurgeUserEvents +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_purge_user_events(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceClient() + + # Initialize request argument(s) + request = recommendationengine_v1beta1.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py new file mode 100644 index 000000000000..7583b085548e --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 WriteUserEvent +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +async def sample_write_user_event(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceAsyncClient() + + # Initialize request argument(s) + user_event = recommendationengine_v1beta1.UserEvent() + user_event.event_type = "event_type_value" + user_event.user_info.visitor_id = "visitor_id_value" + + request = recommendationengine_v1beta1.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = await client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_async] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py new file mode 100644 index 000000000000..42ffae3731e9 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 WriteUserEvent +# 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-recommendations-ai + + +# [START recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommendationengine_v1beta1 + + +def sample_write_user_event(): + # Create a client + client = recommendationengine_v1beta1.UserEventServiceClient() + + # Initialize request argument(s) + user_event = recommendationengine_v1beta1.UserEvent() + user_event.event_type = "event_type_value" + user_event.user_info.visitor_id = "visitor_id_value" + + request = recommendationengine_v1beta1.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_sync] diff --git a/packages/google-cloud-recommendations-ai/samples/generated_samples/snippet_metadata_google.cloud.recommendationengine.v1beta1.json b/packages/google-cloud-recommendations-ai/samples/generated_samples/snippet_metadata_google.cloud.recommendationengine.v1beta1.json new file mode 100644 index 000000000000..8cfa197907b0 --- /dev/null +++ b/packages/google-cloud-recommendations-ai/samples/generated_samples/snippet_metadata_google.cloud.recommendationengine.v1beta1.json @@ -0,0 +1,2570 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.recommendationengine.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-recommendations-ai", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.create_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.CreateCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "CreateCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CreateCatalogItemRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "catalog_item", + "type": "google.cloud.recommendationengine_v1beta1.types.CatalogItem" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "create_catalog_item" + }, + "description": "Sample for CreateCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.create_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.CreateCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "CreateCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CreateCatalogItemRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "catalog_item", + "type": "google.cloud.recommendationengine_v1beta1.types.CatalogItem" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "create_catalog_item" + }, + "description": "Sample for CreateCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_create_catalog_item_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.delete_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.DeleteCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "DeleteCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.DeleteCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_catalog_item" + }, + "description": "Sample for DeleteCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.delete_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.DeleteCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "DeleteCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.DeleteCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_catalog_item" + }, + "description": "Sample for DeleteCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_delete_catalog_item_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.get_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.GetCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.GetCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "get_catalog_item" + }, + "description": "Sample for GetCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.get_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.GetCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.GetCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "get_catalog_item" + }, + "description": "Sample for GetCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_get_catalog_item_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.import_catalog_items", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.ImportCatalogItems", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ImportCatalogItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportCatalogItemsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "request_id", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.recommendationengine_v1beta1.types.InputConfig" + }, + { + "name": "errors_config", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_catalog_items" + }, + "description": "Sample for ImportCatalogItems", + "file": "recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.import_catalog_items", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.ImportCatalogItems", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ImportCatalogItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportCatalogItemsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "request_id", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.recommendationengine_v1beta1.types.InputConfig" + }, + { + "name": "errors_config", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_catalog_items" + }, + "description": "Sample for ImportCatalogItems", + "file": "recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_import_catalog_items_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.list_catalog_items", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.ListCatalogItems", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListCatalogItemsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.catalog_service.pagers.ListCatalogItemsAsyncPager", + "shortName": "list_catalog_items" + }, + "description": "Sample for ListCatalogItems", + "file": "recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.list_catalog_items", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.ListCatalogItems", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogItems" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListCatalogItemsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.catalog_service.pagers.ListCatalogItemsPager", + "shortName": "list_catalog_items" + }, + "description": "Sample for ListCatalogItems", + "file": "recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_list_catalog_items_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceAsyncClient.update_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.UpdateCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.UpdateCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "catalog_item", + "type": "google.cloud.recommendationengine_v1beta1.types.CatalogItem" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "update_catalog_item" + }, + "description": "Sample for UpdateCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.CatalogServiceClient.update_catalog_item", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService.UpdateCatalogItem", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalogItem" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.UpdateCatalogItemRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "catalog_item", + "type": "google.cloud.recommendationengine_v1beta1.types.CatalogItem" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.CatalogItem", + "shortName": "update_catalog_item" + }, + "description": "Sample for UpdateCatalogItem", + "file": "recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_catalog_service_update_catalog_item_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient", + "shortName": "PredictionApiKeyRegistryAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient.create_prediction_api_key_registration", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.CreatePredictionApiKeyRegistration", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "CreatePredictionApiKeyRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CreatePredictionApiKeyRegistrationRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "prediction_api_key_registration", + "type": "google.cloud.recommendationengine_v1beta1.types.PredictionApiKeyRegistration" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.PredictionApiKeyRegistration", + "shortName": "create_prediction_api_key_registration" + }, + "description": "Sample for CreatePredictionApiKeyRegistration", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient", + "shortName": "PredictionApiKeyRegistryClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient.create_prediction_api_key_registration", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.CreatePredictionApiKeyRegistration", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "CreatePredictionApiKeyRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CreatePredictionApiKeyRegistrationRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "prediction_api_key_registration", + "type": "google.cloud.recommendationengine_v1beta1.types.PredictionApiKeyRegistration" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.PredictionApiKeyRegistration", + "shortName": "create_prediction_api_key_registration" + }, + "description": "Sample for CreatePredictionApiKeyRegistration", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_create_prediction_api_key_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient", + "shortName": "PredictionApiKeyRegistryAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient.delete_prediction_api_key_registration", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.DeletePredictionApiKeyRegistration", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "DeletePredictionApiKeyRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.DeletePredictionApiKeyRegistrationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_prediction_api_key_registration" + }, + "description": "Sample for DeletePredictionApiKeyRegistration", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient", + "shortName": "PredictionApiKeyRegistryClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient.delete_prediction_api_key_registration", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.DeletePredictionApiKeyRegistration", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "DeletePredictionApiKeyRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.DeletePredictionApiKeyRegistrationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_prediction_api_key_registration" + }, + "description": "Sample for DeletePredictionApiKeyRegistration", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_delete_prediction_api_key_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient", + "shortName": "PredictionApiKeyRegistryAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryAsyncClient.list_prediction_api_key_registrations", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.ListPredictionApiKeyRegistrations", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "ListPredictionApiKeyRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListPredictionApiKeyRegistrationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.prediction_api_key_registry.pagers.ListPredictionApiKeyRegistrationsAsyncPager", + "shortName": "list_prediction_api_key_registrations" + }, + "description": "Sample for ListPredictionApiKeyRegistrations", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient", + "shortName": "PredictionApiKeyRegistryClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionApiKeyRegistryClient.list_prediction_api_key_registrations", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.ListPredictionApiKeyRegistrations", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "shortName": "PredictionApiKeyRegistry" + }, + "shortName": "ListPredictionApiKeyRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListPredictionApiKeyRegistrationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.prediction_api_key_registry.pagers.ListPredictionApiKeyRegistrationsPager", + "shortName": "list_prediction_api_key_registrations" + }, + "description": "Sample for ListPredictionApiKeyRegistrations", + "file": "recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_api_key_registry_list_prediction_api_key_registrations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionServiceAsyncClient", + "shortName": "PredictionServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionServiceAsyncClient.predict", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionService.Predict", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.PredictRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "user_event", + "type": "google.cloud.recommendationengine_v1beta1.types.UserEvent" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.prediction_service.pagers.PredictAsyncPager", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "recommendationengine_v1beta1_generated_prediction_service_predict_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionService_Predict_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_service_predict_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionServiceClient", + "shortName": "PredictionServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.PredictionServiceClient.predict", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionService.Predict", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.PredictRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "user_event", + "type": "google.cloud.recommendationengine_v1beta1.types.UserEvent" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.prediction_service.pagers.PredictPager", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "recommendationengine_v1beta1_generated_prediction_service_predict_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_PredictionService_Predict_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_prediction_service_predict_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient.collect_user_event", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CollectUserEventRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "user_event", + "type": "str" + }, + { + "name": "uri", + "type": "str" + }, + { + "name": "ets", + "type": "int" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_collect_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient.collect_user_event", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.CollectUserEventRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "user_event", + "type": "str" + }, + { + "name": "uri", + "type": "str" + }, + { + "name": "ets", + "type": "int" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_collect_user_event_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient.import_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "request_id", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.recommendationengine_v1beta1.types.InputConfig" + }, + { + "name": "errors_config", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_import_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient.import_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "request_id", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.recommendationengine_v1beta1.types.InputConfig" + }, + { + "name": "errors_config", + "type": "google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_import_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient.list_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.ListUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ListUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.user_event_service.pagers.ListUserEventsAsyncPager", + "shortName": "list_user_events" + }, + "description": "Sample for ListUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_list_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient.list_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.ListUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ListUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.ListUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.services.user_event_service.pagers.ListUserEventsPager", + "shortName": "list_user_events" + }, + "description": "Sample for ListUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_list_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient.purge_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.PurgeUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "force", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_purge_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient.purge_user_events", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.PurgeUserEventsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "force", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_purge_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceAsyncClient.write_user_event", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.WriteUserEventRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "user_event", + "type": "google.cloud.recommendationengine_v1beta1.types.UserEvent" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_write_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.recommendationengine_v1beta1.UserEventServiceClient.write_user_event", + "method": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.recommendationengine.v1beta1.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommendationengine_v1beta1.types.WriteUserEventRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "user_event", + "type": "google.cloud.recommendationengine_v1beta1.types.UserEvent" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommendationengine_v1beta1.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommendationengine_v1beta1_generated_user_event_service_write_user_event_sync.py" + } + ] +} diff --git a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_catalog_service.py b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_catalog_service.py index 3323b04217a5..5f208a7de24e 100644 --- a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_catalog_service.py +++ b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_catalog_service.py @@ -749,9 +749,6 @@ def test_create_catalog_item(request_type, transport: str = "grpc"): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) response = client.create_catalog_item(request) @@ -1023,9 +1020,6 @@ def test_get_catalog_item(request_type, transport: str = "grpc"): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) response = client.get_catalog_item(request) @@ -1692,9 +1686,11 @@ async def test_list_catalog_items_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_catalog_items(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1729,9 +1725,6 @@ def test_update_catalog_item(request_type, transport: str = "grpc"): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) response = client.update_catalog_item(request) @@ -2564,9 +2557,6 @@ def test_create_catalog_item_rest(request_type): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) # Wrap the value into a proper Response obj @@ -2880,9 +2870,6 @@ def test_get_catalog_item_rest(request_type): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) # Wrap the value into a proper Response obj @@ -3535,9 +3522,6 @@ def test_update_catalog_item_rest(request_type): language_code="language_code_value", tags=["tags_value"], item_group_id="item_group_id_value", - product_metadata=catalog.ProductCatalogItem( - exact_price=catalog.ProductCatalogItem.ExactPrice(display_price=0.1384) - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_api_key_registry.py b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_api_key_registry.py index 398074ed1442..29d1a692185b 100644 --- a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_api_key_registry.py +++ b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_api_key_registry.py @@ -1515,9 +1515,11 @@ async def test_list_prediction_api_key_registrations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_prediction_api_key_registrations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_service.py b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_service.py index de1fff62ce70..5b312e658487 100644 --- a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_service.py +++ b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_prediction_service.py @@ -1179,9 +1179,11 @@ async def test_predict_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.predict(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_user_event_service.py b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_user_event_service.py index 5d8dffe38bde..48870916e989 100644 --- a/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_user_event_service.py +++ b/packages/google-cloud-recommendations-ai/tests/unit/gapic/recommendationengine_v1beta1/test_user_event_service.py @@ -1699,9 +1699,11 @@ async def test_list_user_events_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_user_events(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recommender/google/cloud/recommender/gapic_version.py b/packages/google-cloud-recommender/google/cloud/recommender/gapic_version.py index 9ac1d4a82044..30274cc6e9dd 100644 --- a/packages/google-cloud-recommender/google/cloud/recommender/gapic_version.py +++ b/packages/google-cloud-recommender/google/cloud/recommender/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recommender/google/cloud/recommender_v1/gapic_version.py b/packages/google-cloud-recommender/google/cloud/recommender_v1/gapic_version.py index 9ac1d4a82044..30274cc6e9dd 100644 --- a/packages/google-cloud-recommender/google/cloud/recommender_v1/gapic_version.py +++ b/packages/google-cloud-recommender/google/cloud/recommender_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recommender/google/cloud/recommender_v1/services/recommender/async_client.py b/packages/google-cloud-recommender/google/cloud/recommender_v1/services/recommender/async_client.py index d5a4f01537fc..cef34d0973bc 100644 --- a/packages/google-cloud-recommender/google/cloud/recommender_v1/services/recommender/async_client.py +++ b/packages/google-cloud-recommender/google/cloud/recommender_v1/services/recommender/async_client.py @@ -1769,7 +1769,7 @@ async def sample_update_insight_type_config(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RecommenderAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/gapic_version.py b/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/gapic_version.py index 9ac1d4a82044..30274cc6e9dd 100644 --- a/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/gapic_version.py +++ b/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/services/recommender/async_client.py b/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/services/recommender/async_client.py index 3b1582e7ec91..20e2e17c0f1d 100644 --- a/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/services/recommender/async_client.py +++ b/packages/google-cloud-recommender/google/cloud/recommender_v1beta1/services/recommender/async_client.py @@ -1769,7 +1769,7 @@ async def sample_update_insight_type_config(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RecommenderAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-recommender/noxfile.py b/packages/google-cloud-recommender/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-recommender/noxfile.py +++ b/packages/google-cloud-recommender/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_async.py new file mode 100644 index 000000000000..a25cb2ee29f5 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsight +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetInsight_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_get_insight(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.GetInsightRequest( + name="name_value", + ) + + # Make the request + response = await client.get_insight(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetInsight_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_sync.py new file mode 100644 index 000000000000..21065293a21e --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsight +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetInsight_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_get_insight(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.GetInsightRequest( + name="name_value", + ) + + # Make the request + response = client.get_insight(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetInsight_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_async.py new file mode 100644 index 000000000000..306880b9f6cb --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsightTypeConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetInsightTypeConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_get_insight_type_config(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.GetInsightTypeConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetInsightTypeConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_sync.py new file mode 100644 index 000000000000..76b0538cc5e7 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_insight_type_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsightTypeConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetInsightTypeConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_get_insight_type_config(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.GetInsightTypeConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetInsightTypeConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_async.py new file mode 100644 index 000000000000..0951a74b8403 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommendation +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetRecommendation_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_get_recommendation(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.GetRecommendationRequest( + name="name_value", + ) + + # Make the request + response = await client.get_recommendation(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetRecommendation_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_sync.py new file mode 100644 index 000000000000..f0953f22e789 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommendation_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommendation +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetRecommendation_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_get_recommendation(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.GetRecommendationRequest( + name="name_value", + ) + + # Make the request + response = client.get_recommendation(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetRecommendation_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_async.py new file mode 100644 index 000000000000..9a9537df69b2 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommenderConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetRecommenderConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_get_recommender_config(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.GetRecommenderConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetRecommenderConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_sync.py new file mode 100644 index 000000000000..6ff8ba730600 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_get_recommender_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommenderConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_GetRecommenderConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_get_recommender_config(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.GetRecommenderConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_GetRecommenderConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_async.py new file mode 100644 index 000000000000..83cad6a269c4 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListInsights +# 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-recommender + + +# [START recommender_v1_generated_Recommender_ListInsights_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_list_insights(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.ListInsightsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_insights(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommender_v1_generated_Recommender_ListInsights_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_sync.py new file mode 100644 index 000000000000..c3afabbaa142 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_insights_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListInsights +# 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-recommender + + +# [START recommender_v1_generated_Recommender_ListInsights_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_list_insights(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.ListInsightsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_insights(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommender_v1_generated_Recommender_ListInsights_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_async.py new file mode 100644 index 000000000000..53e293646940 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRecommendations +# 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-recommender + + +# [START recommender_v1_generated_Recommender_ListRecommendations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_list_recommendations(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.ListRecommendationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_recommendations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommender_v1_generated_Recommender_ListRecommendations_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_sync.py new file mode 100644 index 000000000000..ca42c3fc2e7b --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_list_recommendations_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRecommendations +# 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-recommender + + +# [START recommender_v1_generated_Recommender_ListRecommendations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_list_recommendations(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.ListRecommendationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_recommendations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommender_v1_generated_Recommender_ListRecommendations_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_async.py new file mode 100644 index 000000000000..de58bcdfccd7 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkInsightAccepted +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkInsightAccepted_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_mark_insight_accepted(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.MarkInsightAcceptedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_insight_accepted(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkInsightAccepted_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_sync.py new file mode 100644 index 000000000000..c19e435fc3bc --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_insight_accepted_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkInsightAccepted +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkInsightAccepted_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_mark_insight_accepted(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.MarkInsightAcceptedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_insight_accepted(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_async.py new file mode 100644 index 000000000000..7ae9576823b8 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationClaimed +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationClaimed_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_mark_recommendation_claimed(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationClaimedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_claimed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationClaimed_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py new file mode 100644 index 000000000000..8a9e22400d0f --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationClaimed +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_mark_recommendation_claimed(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationClaimedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_claimed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_async.py new file mode 100644 index 000000000000..7f47bfcbbe9e --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationFailed +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationFailed_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_mark_recommendation_failed(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationFailedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_failed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationFailed_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_sync.py new file mode 100644 index 000000000000..70de5b04cd35 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_failed_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationFailed +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_mark_recommendation_failed(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationFailedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_failed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py new file mode 100644 index 000000000000..1345ff01123e --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationSucceeded +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationSucceeded_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_mark_recommendation_succeeded(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationSucceededRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_succeeded(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationSucceeded_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py new file mode 100644 index 000000000000..7dfa5a982dd4 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationSucceeded +# 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-recommender + + +# [START recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_mark_recommendation_succeeded(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.MarkRecommendationSucceededRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_succeeded(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_async.py new file mode 100644 index 000000000000..5bf944a0501b --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInsightTypeConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_UpdateInsightTypeConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_update_insight_type_config(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.UpdateInsightTypeConfigRequest( + ) + + # Make the request + response = await client.update_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_UpdateInsightTypeConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_sync.py new file mode 100644 index 000000000000..1aa45bd297f6 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_insight_type_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInsightTypeConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_UpdateInsightTypeConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_update_insight_type_config(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.UpdateInsightTypeConfigRequest( + ) + + # Make the request + response = client.update_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_UpdateInsightTypeConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_async.py new file mode 100644 index 000000000000..645175909385 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRecommenderConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_UpdateRecommenderConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +async def sample_update_recommender_config(): + # Create a client + client = recommender_v1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1.UpdateRecommenderConfigRequest( + ) + + # Make the request + response = await client.update_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_UpdateRecommenderConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_sync.py new file mode 100644 index 000000000000..e4c5b941bc84 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1_generated_recommender_update_recommender_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRecommenderConfig +# 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-recommender + + +# [START recommender_v1_generated_Recommender_UpdateRecommenderConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1 + + +def sample_update_recommender_config(): + # Create a client + client = recommender_v1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1.UpdateRecommenderConfigRequest( + ) + + # Make the request + response = client.update_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1_generated_Recommender_UpdateRecommenderConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_async.py new file mode 100644 index 000000000000..3c1d01aa1ace --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsight +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetInsight_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_get_insight(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetInsightRequest( + name="name_value", + ) + + # Make the request + response = await client.get_insight(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetInsight_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_sync.py new file mode 100644 index 000000000000..afedf5f59389 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsight +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetInsight_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_get_insight(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetInsightRequest( + name="name_value", + ) + + # Make the request + response = client.get_insight(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetInsight_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_async.py new file mode 100644 index 000000000000..b113ba87a5c2 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsightTypeConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_get_insight_type_config(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetInsightTypeConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py new file mode 100644 index 000000000000..558b0f2e0b0b --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInsightTypeConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_get_insight_type_config(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetInsightTypeConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_async.py new file mode 100644 index 000000000000..f7ad39f2908a --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommendation +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetRecommendation_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_get_recommendation(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetRecommendationRequest( + name="name_value", + ) + + # Make the request + response = await client.get_recommendation(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetRecommendation_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_sync.py new file mode 100644 index 000000000000..d190e8cf2f26 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommendation_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommendation +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetRecommendation_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_get_recommendation(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetRecommendationRequest( + name="name_value", + ) + + # Make the request + response = client.get_recommendation(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetRecommendation_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_async.py new file mode 100644 index 000000000000..fbbf8af05a3e --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommenderConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetRecommenderConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_get_recommender_config(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetRecommenderConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetRecommenderConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_sync.py new file mode 100644 index 000000000000..ca1e2da1bd88 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_get_recommender_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetRecommenderConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_GetRecommenderConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_get_recommender_config(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.GetRecommenderConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_GetRecommenderConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_async.py new file mode 100644 index 000000000000..3fbde6cbae06 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListInsights +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_ListInsights_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_list_insights(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.ListInsightsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_insights(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommender_v1beta1_generated_Recommender_ListInsights_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_sync.py new file mode 100644 index 000000000000..a6e43179b4a9 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_insights_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListInsights +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_ListInsights_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_list_insights(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.ListInsightsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_insights(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommender_v1beta1_generated_Recommender_ListInsights_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_async.py new file mode 100644 index 000000000000..478cbea2f1da --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRecommendations +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_ListRecommendations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_list_recommendations(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.ListRecommendationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_recommendations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END recommender_v1beta1_generated_Recommender_ListRecommendations_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_sync.py new file mode 100644 index 000000000000..180f8c39cbaf --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_list_recommendations_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListRecommendations +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_ListRecommendations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_list_recommendations(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.ListRecommendationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_recommendations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END recommender_v1beta1_generated_Recommender_ListRecommendations_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py new file mode 100644 index 000000000000..acee1e2b4028 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkInsightAccepted +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkInsightAccepted_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_mark_insight_accepted(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkInsightAcceptedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_insight_accepted(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkInsightAccepted_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py new file mode 100644 index 000000000000..4c1a7d89e4c6 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkInsightAccepted +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkInsightAccepted_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_mark_insight_accepted(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkInsightAcceptedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_insight_accepted(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py new file mode 100644 index 000000000000..5e2fc4350506 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationClaimed +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_mark_recommendation_claimed(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationClaimedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_claimed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py new file mode 100644 index 000000000000..32ae5459e693 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationClaimed +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_mark_recommendation_claimed(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationClaimedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_claimed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py new file mode 100644 index 000000000000..89d03d65305b --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationFailed +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_mark_recommendation_failed(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationFailedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_failed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py new file mode 100644 index 000000000000..1c5ca77fca89 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationFailed +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_mark_recommendation_failed(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationFailedRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_failed(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py new file mode 100644 index 000000000000..363abbf84be7 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationSucceeded +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_mark_recommendation_succeeded(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationSucceededRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = await client.mark_recommendation_succeeded(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py new file mode 100644 index 000000000000..c182e59c9f78 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MarkRecommendationSucceeded +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_mark_recommendation_succeeded(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.MarkRecommendationSucceededRequest( + name="name_value", + etag="etag_value", + ) + + # Make the request + response = client.mark_recommendation_succeeded(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_async.py new file mode 100644 index 000000000000..4a8cf887ca52 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInsightTypeConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_update_insight_type_config(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.UpdateInsightTypeConfigRequest( + ) + + # Make the request + response = await client.update_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py new file mode 100644 index 000000000000..e164c112926e --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInsightTypeConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_update_insight_type_config(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.UpdateInsightTypeConfigRequest( + ) + + # Make the request + response = client.update_insight_type_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_async.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_async.py new file mode 100644 index 000000000000..08c67b591877 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRecommenderConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +async def sample_update_recommender_config(): + # Create a client + client = recommender_v1beta1.RecommenderAsyncClient() + + # Initialize request argument(s) + request = recommender_v1beta1.UpdateRecommenderConfigRequest( + ) + + # Make the request + response = await client.update_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_async] diff --git a/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_sync.py b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_sync.py new file mode 100644 index 000000000000..8b756e459e16 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/recommender_v1beta1_generated_recommender_update_recommender_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateRecommenderConfig +# 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-recommender + + +# [START recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import recommender_v1beta1 + + +def sample_update_recommender_config(): + # Create a client + client = recommender_v1beta1.RecommenderClient() + + # Initialize request argument(s) + request = recommender_v1beta1.UpdateRecommenderConfigRequest( + ) + + # Make the request + response = client.update_recommender_config(request=request) + + # Handle the response + print(response) + +# [END recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_sync] diff --git a/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1.json b/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1.json new file mode 100644 index 000000000000..175556945536 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1.json @@ -0,0 +1,2035 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.recommender.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-recommender", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.get_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetInsightTypeConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.InsightTypeConfig", + "shortName": "get_insight_type_config" + }, + "description": "Sample for GetInsightTypeConfig", + "file": "recommender_v1_generated_recommender_get_insight_type_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetInsightTypeConfig_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_insight_type_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.get_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetInsightTypeConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.InsightTypeConfig", + "shortName": "get_insight_type_config" + }, + "description": "Sample for GetInsightTypeConfig", + "file": "recommender_v1_generated_recommender_get_insight_type_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetInsightTypeConfig_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_insight_type_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.get_insight", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetInsight", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsight" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetInsightRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Insight", + "shortName": "get_insight" + }, + "description": "Sample for GetInsight", + "file": "recommender_v1_generated_recommender_get_insight_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetInsight_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_insight_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.get_insight", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetInsight", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsight" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetInsightRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Insight", + "shortName": "get_insight" + }, + "description": "Sample for GetInsight", + "file": "recommender_v1_generated_recommender_get_insight_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetInsight_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_insight_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.get_recommendation", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetRecommendation", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommendation" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetRecommendationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "get_recommendation" + }, + "description": "Sample for GetRecommendation", + "file": "recommender_v1_generated_recommender_get_recommendation_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetRecommendation_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_recommendation_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.get_recommendation", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetRecommendation", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommendation" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetRecommendationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "get_recommendation" + }, + "description": "Sample for GetRecommendation", + "file": "recommender_v1_generated_recommender_get_recommendation_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetRecommendation_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_recommendation_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.get_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetRecommenderConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.RecommenderConfig", + "shortName": "get_recommender_config" + }, + "description": "Sample for GetRecommenderConfig", + "file": "recommender_v1_generated_recommender_get_recommender_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetRecommenderConfig_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_recommender_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.get_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.GetRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.GetRecommenderConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.RecommenderConfig", + "shortName": "get_recommender_config" + }, + "description": "Sample for GetRecommenderConfig", + "file": "recommender_v1_generated_recommender_get_recommender_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_GetRecommenderConfig_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_get_recommender_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.list_insights", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.ListInsights", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListInsights" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.ListInsightsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.services.recommender.pagers.ListInsightsAsyncPager", + "shortName": "list_insights" + }, + "description": "Sample for ListInsights", + "file": "recommender_v1_generated_recommender_list_insights_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_ListInsights_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_list_insights_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.list_insights", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.ListInsights", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListInsights" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.ListInsightsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.services.recommender.pagers.ListInsightsPager", + "shortName": "list_insights" + }, + "description": "Sample for ListInsights", + "file": "recommender_v1_generated_recommender_list_insights_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_ListInsights_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_list_insights_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.list_recommendations", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.ListRecommendations", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListRecommendations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.ListRecommendationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.services.recommender.pagers.ListRecommendationsAsyncPager", + "shortName": "list_recommendations" + }, + "description": "Sample for ListRecommendations", + "file": "recommender_v1_generated_recommender_list_recommendations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_ListRecommendations_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_list_recommendations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.list_recommendations", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.ListRecommendations", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListRecommendations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.ListRecommendationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.services.recommender.pagers.ListRecommendationsPager", + "shortName": "list_recommendations" + }, + "description": "Sample for ListRecommendations", + "file": "recommender_v1_generated_recommender_list_recommendations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_ListRecommendations_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_list_recommendations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.mark_insight_accepted", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkInsightAccepted", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkInsightAccepted" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkInsightAcceptedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Insight", + "shortName": "mark_insight_accepted" + }, + "description": "Sample for MarkInsightAccepted", + "file": "recommender_v1_generated_recommender_mark_insight_accepted_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkInsightAccepted_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_insight_accepted_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.mark_insight_accepted", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkInsightAccepted", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkInsightAccepted" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkInsightAcceptedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Insight", + "shortName": "mark_insight_accepted" + }, + "description": "Sample for MarkInsightAccepted", + "file": "recommender_v1_generated_recommender_mark_insight_accepted_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkInsightAccepted_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_insight_accepted_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.mark_recommendation_claimed", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationClaimed", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationClaimed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_claimed" + }, + "description": "Sample for MarkRecommendationClaimed", + "file": "recommender_v1_generated_recommender_mark_recommendation_claimed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationClaimed_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_claimed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.mark_recommendation_claimed", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationClaimed", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationClaimed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_claimed" + }, + "description": "Sample for MarkRecommendationClaimed", + "file": "recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_claimed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.mark_recommendation_failed", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationFailed", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationFailed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationFailedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_failed" + }, + "description": "Sample for MarkRecommendationFailed", + "file": "recommender_v1_generated_recommender_mark_recommendation_failed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationFailed_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_failed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.mark_recommendation_failed", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationFailed", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationFailed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationFailedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_failed" + }, + "description": "Sample for MarkRecommendationFailed", + "file": "recommender_v1_generated_recommender_mark_recommendation_failed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationFailed_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_failed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.mark_recommendation_succeeded", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationSucceeded", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationSucceeded" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_succeeded" + }, + "description": "Sample for MarkRecommendationSucceeded", + "file": "recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationSucceeded_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_succeeded_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.mark_recommendation_succeeded", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.MarkRecommendationSucceeded", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationSucceeded" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.Recommendation", + "shortName": "mark_recommendation_succeeded" + }, + "description": "Sample for MarkRecommendationSucceeded", + "file": "recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_mark_recommendation_succeeded_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.update_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.UpdateInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.UpdateInsightTypeConfigRequest" + }, + { + "name": "insight_type_config", + "type": "google.cloud.recommender_v1.types.InsightTypeConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.InsightTypeConfig", + "shortName": "update_insight_type_config" + }, + "description": "Sample for UpdateInsightTypeConfig", + "file": "recommender_v1_generated_recommender_update_insight_type_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_UpdateInsightTypeConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_update_insight_type_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.update_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.UpdateInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.UpdateInsightTypeConfigRequest" + }, + { + "name": "insight_type_config", + "type": "google.cloud.recommender_v1.types.InsightTypeConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.InsightTypeConfig", + "shortName": "update_insight_type_config" + }, + "description": "Sample for UpdateInsightTypeConfig", + "file": "recommender_v1_generated_recommender_update_insight_type_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_UpdateInsightTypeConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_update_insight_type_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderAsyncClient.update_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.UpdateRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.UpdateRecommenderConfigRequest" + }, + { + "name": "recommender_config", + "type": "google.cloud.recommender_v1.types.RecommenderConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.RecommenderConfig", + "shortName": "update_recommender_config" + }, + "description": "Sample for UpdateRecommenderConfig", + "file": "recommender_v1_generated_recommender_update_recommender_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_UpdateRecommenderConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_update_recommender_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1.RecommenderClient.update_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1.Recommender.UpdateRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1.types.UpdateRecommenderConfigRequest" + }, + { + "name": "recommender_config", + "type": "google.cloud.recommender_v1.types.RecommenderConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1.types.RecommenderConfig", + "shortName": "update_recommender_config" + }, + "description": "Sample for UpdateRecommenderConfig", + "file": "recommender_v1_generated_recommender_update_recommender_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1_generated_Recommender_UpdateRecommenderConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1_generated_recommender_update_recommender_config_sync.py" + } + ] +} diff --git a/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1beta1.json b/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1beta1.json new file mode 100644 index 000000000000..fd53d49a9486 --- /dev/null +++ b/packages/google-cloud-recommender/samples/generated_samples/snippet_metadata_google.cloud.recommender.v1beta1.json @@ -0,0 +1,2035 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.recommender.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-recommender", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.get_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetInsightTypeConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.InsightTypeConfig", + "shortName": "get_insight_type_config" + }, + "description": "Sample for GetInsightTypeConfig", + "file": "recommender_v1beta1_generated_recommender_get_insight_type_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_insight_type_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.get_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetInsightTypeConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.InsightTypeConfig", + "shortName": "get_insight_type_config" + }, + "description": "Sample for GetInsightTypeConfig", + "file": "recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_insight_type_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.get_insight", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetInsight", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsight" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetInsightRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Insight", + "shortName": "get_insight" + }, + "description": "Sample for GetInsight", + "file": "recommender_v1beta1_generated_recommender_get_insight_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetInsight_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_insight_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.get_insight", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetInsight", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetInsight" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetInsightRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Insight", + "shortName": "get_insight" + }, + "description": "Sample for GetInsight", + "file": "recommender_v1beta1_generated_recommender_get_insight_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetInsight_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_insight_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.get_recommendation", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetRecommendation", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommendation" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetRecommendationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "get_recommendation" + }, + "description": "Sample for GetRecommendation", + "file": "recommender_v1beta1_generated_recommender_get_recommendation_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetRecommendation_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_recommendation_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.get_recommendation", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetRecommendation", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommendation" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetRecommendationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "get_recommendation" + }, + "description": "Sample for GetRecommendation", + "file": "recommender_v1beta1_generated_recommender_get_recommendation_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetRecommendation_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_recommendation_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.get_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetRecommenderConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.RecommenderConfig", + "shortName": "get_recommender_config" + }, + "description": "Sample for GetRecommenderConfig", + "file": "recommender_v1beta1_generated_recommender_get_recommender_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetRecommenderConfig_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_recommender_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.get_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.GetRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "GetRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.GetRecommenderConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.RecommenderConfig", + "shortName": "get_recommender_config" + }, + "description": "Sample for GetRecommenderConfig", + "file": "recommender_v1beta1_generated_recommender_get_recommender_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_GetRecommenderConfig_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_get_recommender_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.list_insights", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.ListInsights", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListInsights" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.ListInsightsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.services.recommender.pagers.ListInsightsAsyncPager", + "shortName": "list_insights" + }, + "description": "Sample for ListInsights", + "file": "recommender_v1beta1_generated_recommender_list_insights_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_ListInsights_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_list_insights_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.list_insights", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.ListInsights", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListInsights" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.ListInsightsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.services.recommender.pagers.ListInsightsPager", + "shortName": "list_insights" + }, + "description": "Sample for ListInsights", + "file": "recommender_v1beta1_generated_recommender_list_insights_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_ListInsights_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_list_insights_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.list_recommendations", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.ListRecommendations", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListRecommendations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.ListRecommendationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.services.recommender.pagers.ListRecommendationsAsyncPager", + "shortName": "list_recommendations" + }, + "description": "Sample for ListRecommendations", + "file": "recommender_v1beta1_generated_recommender_list_recommendations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_ListRecommendations_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_list_recommendations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.list_recommendations", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.ListRecommendations", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "ListRecommendations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.ListRecommendationsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "filter", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.services.recommender.pagers.ListRecommendationsPager", + "shortName": "list_recommendations" + }, + "description": "Sample for ListRecommendations", + "file": "recommender_v1beta1_generated_recommender_list_recommendations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_ListRecommendations_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_list_recommendations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.mark_insight_accepted", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkInsightAccepted", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkInsightAccepted" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkInsightAcceptedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Insight", + "shortName": "mark_insight_accepted" + }, + "description": "Sample for MarkInsightAccepted", + "file": "recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkInsightAccepted_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_insight_accepted_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.mark_insight_accepted", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkInsightAccepted", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkInsightAccepted" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkInsightAcceptedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Insight", + "shortName": "mark_insight_accepted" + }, + "description": "Sample for MarkInsightAccepted", + "file": "recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkInsightAccepted_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_insight_accepted_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.mark_recommendation_claimed", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationClaimed", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationClaimed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_claimed" + }, + "description": "Sample for MarkRecommendationClaimed", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_claimed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.mark_recommendation_claimed", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationClaimed", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationClaimed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_claimed" + }, + "description": "Sample for MarkRecommendationClaimed", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_claimed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.mark_recommendation_failed", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationFailed", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationFailed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_failed" + }, + "description": "Sample for MarkRecommendationFailed", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_failed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.mark_recommendation_failed", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationFailed", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationFailed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_failed" + }, + "description": "Sample for MarkRecommendationFailed", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_failed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.mark_recommendation_succeeded", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationSucceeded", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationSucceeded" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_succeeded" + }, + "description": "Sample for MarkRecommendationSucceeded", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.mark_recommendation_succeeded", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.MarkRecommendationSucceeded", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "MarkRecommendationSucceeded" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "state_metadata", + "type": "MutableMapping[str, str]" + }, + { + "name": "etag", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.Recommendation", + "shortName": "mark_recommendation_succeeded" + }, + "description": "Sample for MarkRecommendationSucceeded", + "file": "recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_mark_recommendation_succeeded_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.update_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.UpdateInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.UpdateInsightTypeConfigRequest" + }, + { + "name": "insight_type_config", + "type": "google.cloud.recommender_v1beta1.types.InsightTypeConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.InsightTypeConfig", + "shortName": "update_insight_type_config" + }, + "description": "Sample for UpdateInsightTypeConfig", + "file": "recommender_v1beta1_generated_recommender_update_insight_type_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_update_insight_type_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.update_insight_type_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.UpdateInsightTypeConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateInsightTypeConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.UpdateInsightTypeConfigRequest" + }, + { + "name": "insight_type_config", + "type": "google.cloud.recommender_v1beta1.types.InsightTypeConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.InsightTypeConfig", + "shortName": "update_insight_type_config" + }, + "description": "Sample for UpdateInsightTypeConfig", + "file": "recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_update_insight_type_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient", + "shortName": "RecommenderAsyncClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderAsyncClient.update_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.UpdateRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.UpdateRecommenderConfigRequest" + }, + { + "name": "recommender_config", + "type": "google.cloud.recommender_v1beta1.types.RecommenderConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.RecommenderConfig", + "shortName": "update_recommender_config" + }, + "description": "Sample for UpdateRecommenderConfig", + "file": "recommender_v1beta1_generated_recommender_update_recommender_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_update_recommender_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient", + "shortName": "RecommenderClient" + }, + "fullName": "google.cloud.recommender_v1beta1.RecommenderClient.update_recommender_config", + "method": { + "fullName": "google.cloud.recommender.v1beta1.Recommender.UpdateRecommenderConfig", + "service": { + "fullName": "google.cloud.recommender.v1beta1.Recommender", + "shortName": "Recommender" + }, + "shortName": "UpdateRecommenderConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.recommender_v1beta1.types.UpdateRecommenderConfigRequest" + }, + { + "name": "recommender_config", + "type": "google.cloud.recommender_v1beta1.types.RecommenderConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.recommender_v1beta1.types.RecommenderConfig", + "shortName": "update_recommender_config" + }, + "description": "Sample for UpdateRecommenderConfig", + "file": "recommender_v1beta1_generated_recommender_update_recommender_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "recommender_v1beta1_generated_recommender_update_recommender_config_sync.py" + } + ] +} diff --git a/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1/test_recommender.py b/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1/test_recommender.py index 177aa85ce501..a21f7ea0d4e8 100644 --- a/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1/test_recommender.py +++ b/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1/test_recommender.py @@ -1106,9 +1106,11 @@ async def test_list_insights_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_insights(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2098,9 +2100,11 @@ async def test_list_recommendations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_recommendations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1beta1/test_recommender.py b/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1beta1/test_recommender.py index 77e64ecbe062..2534867e93a4 100644 --- a/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1beta1/test_recommender.py +++ b/packages/google-cloud-recommender/tests/unit/gapic/recommender_v1beta1/test_recommender.py @@ -1106,9 +1106,11 @@ async def test_list_insights_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_insights(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2098,9 +2100,11 @@ async def test_list_recommendations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_recommendations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-redis/google/cloud/redis/gapic_version.py b/packages/google-cloud-redis/google/cloud/redis/gapic_version.py index a3c9255942c5..30274cc6e9dd 100644 --- a/packages/google-cloud-redis/google/cloud/redis/gapic_version.py +++ b/packages/google-cloud-redis/google/cloud/redis/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-redis/google/cloud/redis_v1/gapic_version.py b/packages/google-cloud-redis/google/cloud/redis_v1/gapic_version.py index a3c9255942c5..30274cc6e9dd 100644 --- a/packages/google-cloud-redis/google/cloud/redis_v1/gapic_version.py +++ b/packages/google-cloud-redis/google/cloud/redis_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/packages/google-cloud-redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index 8242063bbc9c..5195d7ee766b 100644 --- a/packages/google-cloud-redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/packages/google-cloud-redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -2012,7 +2012,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CloudRedisAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-redis/google/cloud/redis_v1beta1/gapic_version.py b/packages/google-cloud-redis/google/cloud/redis_v1beta1/gapic_version.py index a3c9255942c5..30274cc6e9dd 100644 --- a/packages/google-cloud-redis/google/cloud/redis_v1beta1/gapic_version.py +++ b/packages/google-cloud-redis/google/cloud/redis_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-redis/google/cloud/redis_v1beta1/services/cloud_redis/async_client.py b/packages/google-cloud-redis/google/cloud/redis_v1beta1/services/cloud_redis/async_client.py index d3b5f3f2dcf6..77740f5ac54e 100644 --- a/packages/google-cloud-redis/google/cloud/redis_v1beta1/services/cloud_redis/async_client.py +++ b/packages/google-cloud-redis/google/cloud/redis_v1beta1/services/cloud_redis/async_client.py @@ -1686,7 +1686,7 @@ async def sample_reschedule_maintenance(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CloudRedisAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-redis/noxfile.py b/packages/google-cloud-redis/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-redis/noxfile.py +++ b/packages/google-cloud-redis/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_async.py new file mode 100644 index 000000000000..d8dadeb17b0d --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_CreateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_create_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_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 redis_v1_generated_CloudRedis_CreateInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_sync.py new file mode 100644 index 000000000000..7eed2cf2e0a8 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_create_instance_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_CreateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_create_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_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 redis_v1_generated_CloudRedis_CreateInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_async.py new file mode 100644 index 000000000000..5db2cb522ae4 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_DeleteInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_delete_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_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 redis_v1_generated_CloudRedis_DeleteInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_sync.py new file mode 100644 index 000000000000..625687593833 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_delete_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_DeleteInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_delete_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_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 redis_v1_generated_CloudRedis_DeleteInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_async.py new file mode 100644 index 000000000000..0a8be9007b5f --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ExportInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ExportInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_export_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + output_config = redis_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_ExportInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_sync.py new file mode 100644 index 000000000000..39eaa613b3b4 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_export_instance_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ExportInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ExportInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_export_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + output_config = redis_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_ExportInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_async.py new file mode 100644 index 000000000000..a92223c78562 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FailoverInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_FailoverInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_failover_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1.FailoverInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_FailoverInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_sync.py new file mode 100644 index 000000000000..1c735ff82f1e --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_failover_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FailoverInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_FailoverInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_failover_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1.FailoverInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_FailoverInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_async.py new file mode 100644 index 000000000000..93294bca1eb2 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_get_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_GetInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_async.py new file mode 100644 index 000000000000..32a4170287cb --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInstanceAuthString +# 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-redis + + +# [START redis_v1_generated_CloudRedis_GetInstanceAuthString_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_get_instance_auth_string(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1.GetInstanceAuthStringRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance_auth_string(request=request) + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_GetInstanceAuthString_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py new file mode 100644 index 000000000000..b4b935fbf5d1 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInstanceAuthString +# 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-redis + + +# [START redis_v1_generated_CloudRedis_GetInstanceAuthString_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_get_instance_auth_string(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1.GetInstanceAuthStringRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance_auth_string(request=request) + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_GetInstanceAuthString_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_sync.py new file mode 100644 index 000000000000..69cb243a5069 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_get_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_GetInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_async.py new file mode 100644 index 000000000000..168b60a07ab8 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ImportInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_import_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + input_config = redis_v1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_ImportInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_sync.py new file mode 100644 index 000000000000..47995a43b688 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_import_instance_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ImportInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_import_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + input_config = redis_v1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_ImportInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_async.py new file mode 100644 index 000000000000..087145fca3da --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ListInstances_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_list_instances(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_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 redis_v1_generated_CloudRedis_ListInstances_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_sync.py new file mode 100644 index 000000000000..ef788e11feec --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_list_instances_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_ListInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_list_instances(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_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 redis_v1_generated_CloudRedis_ListInstances_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_async.py new file mode 100644 index 000000000000..c4ab64f035f5 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RescheduleMaintenance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_RescheduleMaintenance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_reschedule_maintenance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1.RescheduleMaintenanceRequest( + name="name_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_RescheduleMaintenance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py new file mode 100644 index 000000000000..bd28a6a919ed --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RescheduleMaintenance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_RescheduleMaintenance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_reschedule_maintenance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1.RescheduleMaintenanceRequest( + name="name_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_RescheduleMaintenance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_async.py new file mode 100644 index 000000000000..fc085a4783e4 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_UpdateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_update_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_UpdateInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_sync.py new file mode 100644 index 000000000000..a805e2417bfd --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_update_instance_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstance +# 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-redis + + +# [START redis_v1_generated_CloudRedis_UpdateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_update_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1_generated_CloudRedis_UpdateInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_async.py new file mode 100644 index 000000000000..00c64cbebb7a --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_UpgradeInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +async def sample_upgrade_instance(): + # Create a client + client = redis_v1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1.UpgradeInstanceRequest( + name="name_value", + redis_version="redis_version_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 redis_v1_generated_CloudRedis_UpgradeInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_sync.py new file mode 100644 index 000000000000..fc02e45b9313 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1_generated_cloud_redis_upgrade_instance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1_generated_CloudRedis_UpgradeInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1 + + +def sample_upgrade_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1.UpgradeInstanceRequest( + name="name_value", + redis_version="redis_version_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 redis_v1_generated_CloudRedis_UpgradeInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_async.py new file mode 100644 index 000000000000..fed0edc37e4e --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_CreateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_create_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + instance = redis_v1beta1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_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 redis_v1beta1_generated_CloudRedis_CreateInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_sync.py new file mode 100644 index 000000000000..9dcf6e8bdad0 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_create_instance_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_CreateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_create_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1beta1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_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 redis_v1beta1_generated_CloudRedis_CreateInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_async.py new file mode 100644 index 000000000000..7cb0eafe8d5f --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_DeleteInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_delete_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_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 redis_v1beta1_generated_CloudRedis_DeleteInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_sync.py new file mode 100644 index 000000000000..07d7d151da0a --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_delete_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_DeleteInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_delete_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_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 redis_v1beta1_generated_CloudRedis_DeleteInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_async.py new file mode 100644 index 000000000000..7c5a621b25a8 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ExportInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ExportInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_export_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + output_config = redis_v1beta1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1beta1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_ExportInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_sync.py new file mode 100644 index 000000000000..bc440179abd5 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_export_instance_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ExportInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ExportInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_export_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + output_config = redis_v1beta1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1beta1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_ExportInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_async.py new file mode 100644 index 000000000000..e3eb31029337 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FailoverInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_FailoverInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_failover_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1beta1.FailoverInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_FailoverInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_sync.py new file mode 100644 index 000000000000..006a79c4f686 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_failover_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 FailoverInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_FailoverInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_failover_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1beta1.FailoverInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_FailoverInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_async.py new file mode 100644 index 000000000000..dfcd012d60ca --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_get_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_GetInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py new file mode 100644 index 000000000000..5a3c14fc2148 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInstanceAuthString +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_get_instance_auth_string(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1beta1.GetInstanceAuthStringRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance_auth_string(request=request) + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py new file mode 100644 index 000000000000..6a8bdbdcca93 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetInstanceAuthString +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_get_instance_auth_string(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1beta1.GetInstanceAuthStringRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance_auth_string(request=request) + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_sync.py new file mode 100644 index 000000000000..0a9c4ec67a51 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_get_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1beta1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_GetInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_async.py new file mode 100644 index 000000000000..df2856460a0b --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ImportInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_import_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + input_config = redis_v1beta1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1beta1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_ImportInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_sync.py new file mode 100644 index 000000000000..f71d1d7e896e --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_import_instance_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ImportInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ImportInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_import_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + input_config = redis_v1beta1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1beta1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_ImportInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_async.py new file mode 100644 index 000000000000..5a766a26fc09 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ListInstances_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_list_instances(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_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 redis_v1beta1_generated_CloudRedis_ListInstances_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_sync.py new file mode 100644 index 000000000000..128fa31d4bef --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_list_instances_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_ListInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_list_instances(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_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 redis_v1beta1_generated_CloudRedis_ListInstances_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py new file mode 100644 index 000000000000..0fbeab381415 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RescheduleMaintenance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_reschedule_maintenance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1beta1.RescheduleMaintenanceRequest( + name="name_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py new file mode 100644 index 000000000000..c4f5e67979ff --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 RescheduleMaintenance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_reschedule_maintenance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1beta1.RescheduleMaintenanceRequest( + name="name_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_async.py new file mode 100644 index 000000000000..6a6a0f66cb3a --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_UpdateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_update_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + instance = redis_v1beta1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1beta1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_UpdateInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_sync.py new file mode 100644 index 000000000000..30929b047897 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_update_instance_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateInstance +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_UpdateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_update_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1beta1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1beta1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END redis_v1beta1_generated_CloudRedis_UpdateInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py new file mode 100644 index 000000000000..461c8398c691 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_UpgradeInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +async def sample_upgrade_instance(): + # Create a client + client = redis_v1beta1.CloudRedisAsyncClient() + + # Initialize request argument(s) + request = redis_v1beta1.UpgradeInstanceRequest( + name="name_value", + redis_version="redis_version_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 redis_v1beta1_generated_CloudRedis_UpgradeInstance_async] diff --git a/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py new file mode 100644 index 000000000000..7f52c9ea9dbc --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-redis + + +# [START redis_v1beta1_generated_CloudRedis_UpgradeInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import redis_v1beta1 + + +def sample_upgrade_instance(): + # Create a client + client = redis_v1beta1.CloudRedisClient() + + # Initialize request argument(s) + request = redis_v1beta1.UpgradeInstanceRequest( + name="name_value", + redis_version="redis_version_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 redis_v1beta1_generated_CloudRedis_UpgradeInstance_sync] diff --git a/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1.json b/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1.json new file mode 100644 index 000000000000..174d9dff49b1 --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1.json @@ -0,0 +1,1858 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.redis.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-redis", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.CreateInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "redis_v1_generated_cloud_redis_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_CreateInstance_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.create_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.CreateInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "redis_v1_generated_cloud_redis_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_CreateInstance_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.DeleteInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "redis_v1_generated_cloud_redis_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_DeleteInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.delete_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.DeleteInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "redis_v1_generated_cloud_redis_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_DeleteInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.export_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ExportInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ExportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ExportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "output_config", + "type": "google.cloud.redis_v1.types.OutputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "export_instance" + }, + "description": "Sample for ExportInstance", + "file": "redis_v1_generated_cloud_redis_export_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ExportInstance_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_export_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.export_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ExportInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ExportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ExportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "output_config", + "type": "google.cloud.redis_v1.types.OutputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "export_instance" + }, + "description": "Sample for ExportInstance", + "file": "redis_v1_generated_cloud_redis_export_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ExportInstance_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_export_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.failover_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.FailoverInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "FailoverInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.FailoverInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data_protection_mode", + "type": "google.cloud.redis_v1.types.FailoverInstanceRequest.DataProtectionMode" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "failover_instance" + }, + "description": "Sample for FailoverInstance", + "file": "redis_v1_generated_cloud_redis_failover_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_FailoverInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_failover_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.failover_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.FailoverInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "FailoverInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.FailoverInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data_protection_mode", + "type": "google.cloud.redis_v1.types.FailoverInstanceRequest.DataProtectionMode" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "failover_instance" + }, + "description": "Sample for FailoverInstance", + "file": "redis_v1_generated_cloud_redis_failover_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_FailoverInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_failover_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.get_instance_auth_string", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.GetInstanceAuthString", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstanceAuthString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.GetInstanceAuthStringRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.types.InstanceAuthString", + "shortName": "get_instance_auth_string" + }, + "description": "Sample for GetInstanceAuthString", + "file": "redis_v1_generated_cloud_redis_get_instance_auth_string_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_GetInstanceAuthString_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_get_instance_auth_string_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.get_instance_auth_string", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.GetInstanceAuthString", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstanceAuthString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.GetInstanceAuthStringRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.types.InstanceAuthString", + "shortName": "get_instance_auth_string" + }, + "description": "Sample for GetInstanceAuthString", + "file": "redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_GetInstanceAuthString_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_get_instance_auth_string_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.GetInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "redis_v1_generated_cloud_redis_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.get_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.GetInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "redis_v1_generated_cloud_redis_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.import_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ImportInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ImportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ImportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.redis_v1.types.InputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_instance" + }, + "description": "Sample for ImportInstance", + "file": "redis_v1_generated_cloud_redis_import_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ImportInstance_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_import_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.import_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ImportInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ImportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ImportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.redis_v1.types.InputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_instance" + }, + "description": "Sample for ImportInstance", + "file": "redis_v1_generated_cloud_redis_import_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ImportInstance_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_import_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ListInstances", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "redis_v1_generated_cloud_redis_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ListInstances_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.list_instances", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.ListInstances", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "redis_v1_generated_cloud_redis_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_ListInstances_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.RescheduleMaintenanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.redis_v1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "redis_v1_generated_cloud_redis_reschedule_maintenance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_RescheduleMaintenance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_reschedule_maintenance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.RescheduleMaintenanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.redis_v1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_RescheduleMaintenance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_reschedule_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.update_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.UpdateInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "redis_v1_generated_cloud_redis_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_UpdateInstance_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.update_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.UpdateInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "redis_v1_generated_cloud_redis_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_UpdateInstance_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisAsyncClient.upgrade_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.UpgradeInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.UpgradeInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "redis_version", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "redis_v1_generated_cloud_redis_upgrade_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_UpgradeInstance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_upgrade_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1.CloudRedisClient.upgrade_instance", + "method": { + "fullName": "google.cloud.redis.v1.CloudRedis.UpgradeInstance", + "service": { + "fullName": "google.cloud.redis.v1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1.types.UpgradeInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "redis_version", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "redis_v1_generated_cloud_redis_upgrade_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1_generated_CloudRedis_UpgradeInstance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1_generated_cloud_redis_upgrade_instance_sync.py" + } + ] +} diff --git a/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1beta1.json b/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1beta1.json new file mode 100644 index 000000000000..443ce93aea7f --- /dev/null +++ b/packages/google-cloud-redis/samples/generated_samples/snippet_metadata_google.cloud.redis.v1beta1.json @@ -0,0 +1,1858 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.redis.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-redis", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.CreateInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1beta1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "redis_v1beta1_generated_cloud_redis_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_CreateInstance_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.create_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.CreateInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1beta1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "redis_v1beta1_generated_cloud_redis_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_CreateInstance_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.DeleteInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "redis_v1beta1_generated_cloud_redis_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_DeleteInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.delete_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.DeleteInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "redis_v1beta1_generated_cloud_redis_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_DeleteInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.export_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ExportInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ExportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ExportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "output_config", + "type": "google.cloud.redis_v1beta1.types.OutputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "export_instance" + }, + "description": "Sample for ExportInstance", + "file": "redis_v1beta1_generated_cloud_redis_export_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ExportInstance_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_export_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.export_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ExportInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ExportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ExportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "output_config", + "type": "google.cloud.redis_v1beta1.types.OutputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "export_instance" + }, + "description": "Sample for ExportInstance", + "file": "redis_v1beta1_generated_cloud_redis_export_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ExportInstance_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_export_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.failover_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.FailoverInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "FailoverInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.FailoverInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data_protection_mode", + "type": "google.cloud.redis_v1beta1.types.FailoverInstanceRequest.DataProtectionMode" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "failover_instance" + }, + "description": "Sample for FailoverInstance", + "file": "redis_v1beta1_generated_cloud_redis_failover_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_FailoverInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_failover_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.failover_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.FailoverInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "FailoverInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.FailoverInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data_protection_mode", + "type": "google.cloud.redis_v1beta1.types.FailoverInstanceRequest.DataProtectionMode" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "failover_instance" + }, + "description": "Sample for FailoverInstance", + "file": "redis_v1beta1_generated_cloud_redis_failover_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_FailoverInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_failover_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.get_instance_auth_string", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.GetInstanceAuthString", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstanceAuthString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.GetInstanceAuthStringRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.types.InstanceAuthString", + "shortName": "get_instance_auth_string" + }, + "description": "Sample for GetInstanceAuthString", + "file": "redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_get_instance_auth_string_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.get_instance_auth_string", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.GetInstanceAuthString", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstanceAuthString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.GetInstanceAuthStringRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.types.InstanceAuthString", + "shortName": "get_instance_auth_string" + }, + "description": "Sample for GetInstanceAuthString", + "file": "redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_get_instance_auth_string_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.GetInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "redis_v1beta1_generated_cloud_redis_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.get_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.GetInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "redis_v1beta1_generated_cloud_redis_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.import_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ImportInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ImportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ImportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.redis_v1beta1.types.InputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_instance" + }, + "description": "Sample for ImportInstance", + "file": "redis_v1beta1_generated_cloud_redis_import_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ImportInstance_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_import_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.import_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ImportInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ImportInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ImportInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "input_config", + "type": "google.cloud.redis_v1beta1.types.InputConfig" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_instance" + }, + "description": "Sample for ImportInstance", + "file": "redis_v1beta1_generated_cloud_redis_import_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ImportInstance_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_import_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ListInstances", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.services.cloud_redis.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "redis_v1beta1_generated_cloud_redis_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ListInstances_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.list_instances", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.ListInstances", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.redis_v1beta1.services.cloud_redis.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "redis_v1beta1_generated_cloud_redis_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_ListInstances_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.RescheduleMaintenanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.redis_v1beta1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_reschedule_maintenance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.RescheduleMaintenanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.redis_v1beta1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_reschedule_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.update_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.UpdateInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1beta1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "redis_v1beta1_generated_cloud_redis_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_UpdateInstance_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.update_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.UpdateInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "instance", + "type": "google.cloud.redis_v1beta1.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "redis_v1beta1_generated_cloud_redis_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_UpdateInstance_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient", + "shortName": "CloudRedisAsyncClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisAsyncClient.upgrade_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.UpgradeInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "redis_version", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_UpgradeInstance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_upgrade_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient", + "shortName": "CloudRedisClient" + }, + "fullName": "google.cloud.redis_v1beta1.CloudRedisClient.upgrade_instance", + "method": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance", + "service": { + "fullName": "google.cloud.redis.v1beta1.CloudRedis", + "shortName": "CloudRedis" + }, + "shortName": "UpgradeInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.redis_v1beta1.types.UpgradeInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "redis_version", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "upgrade_instance" + }, + "description": "Sample for UpgradeInstance", + "file": "redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "redis_v1beta1_generated_CloudRedis_UpgradeInstance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "redis_v1beta1_generated_cloud_redis_upgrade_instance_sync.py" + } + ] +} diff --git a/packages/google-cloud-redis/tests/unit/gapic/redis_v1/test_cloud_redis.py b/packages/google-cloud-redis/tests/unit/gapic/redis_v1/test_cloud_redis.py index ea712742290c..134daa3f7daf 100644 --- a/packages/google-cloud-redis/tests/unit/gapic/redis_v1/test_cloud_redis.py +++ b/packages/google-cloud-redis/tests/unit/gapic/redis_v1/test_cloud_redis.py @@ -1112,9 +1112,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-redis/tests/unit/gapic/redis_v1beta1/test_cloud_redis.py b/packages/google-cloud-redis/tests/unit/gapic/redis_v1beta1/test_cloud_redis.py index a216e1637852..cf6a0ef2be9e 100644 --- a/packages/google-cloud-redis/tests/unit/gapic/redis_v1beta1/test_cloud_redis.py +++ b/packages/google-cloud-redis/tests/unit/gapic/redis_v1beta1/test_cloud_redis.py @@ -1112,9 +1112,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager/gapic_version.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager/gapic_version.py index 6f9b28f95196..30274cc6e9dd 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager/gapic_version.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.10.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/gapic_version.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/gapic_version.py index 6f9b28f95196..30274cc6e9dd 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/gapic_version.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.10.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/folders/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/folders/async_client.py index e8ebf949f4ac..3f9543726fff 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/folders/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/folders/async_client.py @@ -1827,7 +1827,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "FoldersAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/organizations/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/organizations/async_client.py index ea5fa4bd09f9..7239b040f597 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/organizations/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/organizations/async_client.py @@ -997,7 +997,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "OrganizationsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/projects/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/projects/async_client.py index 924fa4593551..25b1b7ff028e 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/projects/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/projects/async_client.py @@ -1884,7 +1884,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ProjectsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_bindings/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_bindings/async_client.py index ecce3eded1f8..252aa0c7e3df 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_bindings/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_bindings/async_client.py @@ -748,7 +748,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TagBindingsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_holds/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_holds/async_client.py index a25dd11a5fbf..d34251d0253f 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_holds/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_holds/async_client.py @@ -642,7 +642,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TagHoldsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_keys/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_keys/async_client.py index 9f6371a097ed..b4d2fd1bfefe 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_keys/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_keys/async_client.py @@ -1445,7 +1445,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TagKeysAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_values/async_client.py b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_values/async_client.py index e86924285f6f..904dfe8402cb 100644 --- a/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_values/async_client.py +++ b/packages/google-cloud-resource-manager/google/cloud/resourcemanager_v3/services/tag_values/async_client.py @@ -1454,7 +1454,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TagValuesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-manager/noxfile.py b/packages/google-cloud-resource-manager/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-resource-manager/noxfile.py +++ b/packages/google-cloud-resource-manager/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_async.py new file mode 100644 index 000000000000..d89b2c161bad --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_CreateFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + folder = resourcemanager_v3.Folder() + folder.parent = "parent_value" + + request = resourcemanager_v3.CreateFolderRequest( + folder=folder, + ) + + # Make the request + operation = client.create_folder(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_CreateFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_sync.py new file mode 100644 index 000000000000..5471a49c0929 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_create_folder_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_CreateFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + folder = resourcemanager_v3.Folder() + folder.parent = "parent_value" + + request = resourcemanager_v3.CreateFolderRequest( + folder=folder, + ) + + # Make the request + operation = client.create_folder(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_CreateFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_async.py new file mode 100644 index 000000000000..a07851ac3697 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_DeleteFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteFolderRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_folder(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_DeleteFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_sync.py new file mode 100644 index 000000000000..91b70c78958e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_delete_folder_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_DeleteFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteFolderRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_folder(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_DeleteFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_async.py new file mode 100644 index 000000000000..bfa1fc5bd0c0 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_GetFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetFolderRequest( + name="name_value", + ) + + # Make the request + response = await client.get_folder(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_GetFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_sync.py new file mode 100644 index 000000000000..53416abbdf95 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_folder_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_GetFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetFolderRequest( + name="name_value", + ) + + # Make the request + response = client.get_folder(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_GetFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py new file mode 100644 index 000000000000..66c59cd3b55c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_GetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py new file mode 100644 index 000000000000..fcb3417966f9 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_GetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_async.py new file mode 100644 index 000000000000..11d2f3f6573f --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListFolders +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_ListFolders_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_folders(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListFoldersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_folders(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_ListFolders_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_sync.py new file mode 100644 index 000000000000..cba1515e142e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_list_folders_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListFolders +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_ListFolders_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_folders(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListFoldersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_folders(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_ListFolders_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_async.py new file mode 100644 index 000000000000..b843ac925751 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MoveFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_MoveFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_move_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.MoveFolderRequest( + name="name_value", + destination_parent="destination_parent_value", + ) + + # Make the request + operation = client.move_folder(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_MoveFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_sync.py new file mode 100644 index 000000000000..ad3d694a3d0a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_move_folder_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MoveFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_MoveFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_move_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.MoveFolderRequest( + name="name_value", + destination_parent="destination_parent_value", + ) + + # Make the request + operation = client.move_folder(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_MoveFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_async.py new file mode 100644 index 000000000000..36818e0622ac --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchFolders +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_SearchFolders_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_search_folders(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchFoldersRequest( + ) + + # Make the request + page_result = client.search_folders(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_SearchFolders_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_sync.py new file mode 100644 index 000000000000..b93aba17588b --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_search_folders_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchFolders +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_SearchFolders_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_search_folders(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchFoldersRequest( + ) + + # Make the request + page_result = client.search_folders(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_SearchFolders_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py new file mode 100644 index 000000000000..d684510897e8 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_SetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py new file mode 100644 index 000000000000..5aba5b5c4bcf --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_SetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py new file mode 100644 index 000000000000..2c8ca84fa316 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_TestIamPermissions_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py new file mode 100644 index 000000000000..1fde48ae6c69 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_TestIamPermissions_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_async.py new file mode 100644 index 000000000000..abc8ad325992 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_UndeleteFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_undelete_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UndeleteFolderRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_folder(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_UndeleteFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py new file mode 100644 index 000000000000..6977800f762a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_UndeleteFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_undelete_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UndeleteFolderRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_folder(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_UndeleteFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_async.py new file mode 100644 index 000000000000..515f4ae64f7a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_UpdateFolder_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_update_folder(): + # Create a client + client = resourcemanager_v3.FoldersAsyncClient() + + # Initialize request argument(s) + folder = resourcemanager_v3.Folder() + folder.parent = "parent_value" + + request = resourcemanager_v3.UpdateFolderRequest( + folder=folder, + ) + + # Make the request + operation = client.update_folder(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_UpdateFolder_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_sync.py new file mode 100644 index 000000000000..c2b5f39adf27 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_folders_update_folder_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateFolder +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Folders_UpdateFolder_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_update_folder(): + # Create a client + client = resourcemanager_v3.FoldersClient() + + # Initialize request argument(s) + folder = resourcemanager_v3.Folder() + folder.parent = "parent_value" + + request = resourcemanager_v3.UpdateFolderRequest( + folder=folder, + ) + + # Make the request + operation = client.update_folder(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Folders_UpdateFolder_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py new file mode 100644 index 000000000000..a6fff7fba174 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.OrganizationsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py new file mode 100644 index 000000000000..423b614e70f1 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.OrganizationsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_async.py new file mode 100644 index 000000000000..55de2b68f8d0 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetOrganization +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_GetOrganization_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_organization(): + # Create a client + client = resourcemanager_v3.OrganizationsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetOrganizationRequest( + name="name_value", + ) + + # Make the request + response = await client.get_organization(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_GetOrganization_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_sync.py new file mode 100644 index 000000000000..aff37ad0e21c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_get_organization_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetOrganization +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_GetOrganization_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_organization(): + # Create a client + client = resourcemanager_v3.OrganizationsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetOrganizationRequest( + name="name_value", + ) + + # Make the request + response = client.get_organization(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_GetOrganization_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_async.py new file mode 100644 index 000000000000..45db8898fa56 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchOrganizations +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_search_organizations(): + # Create a client + client = resourcemanager_v3.OrganizationsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchOrganizationsRequest( + ) + + # Make the request + page_result = client.search_organizations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py new file mode 100644 index 000000000000..2481a0f0577e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchOrganizations +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_search_organizations(): + # Create a client + client = resourcemanager_v3.OrganizationsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchOrganizationsRequest( + ) + + # Make the request + page_result = client.search_organizations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py new file mode 100644 index 000000000000..650e62a3c72a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.OrganizationsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py new file mode 100644 index 000000000000..79c73a8ec391 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.OrganizationsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py new file mode 100644 index 000000000000..423d1810bcdc --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.OrganizationsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py new file mode 100644 index 000000000000..c0f6aa121b90 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.OrganizationsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_async.py new file mode 100644 index 000000000000..0a6c6b88d4b9 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_CreateProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.CreateProjectRequest( + ) + + # Make the request + operation = client.create_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_CreateProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_sync.py new file mode 100644 index 000000000000..ccb70b84d97e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_create_project_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_CreateProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.CreateProjectRequest( + ) + + # Make the request + operation = client.create_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_CreateProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_async.py new file mode 100644 index 000000000000..dc6bb6c835b6 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_DeleteProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_DeleteProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_sync.py new file mode 100644 index 000000000000..fe6641aa50f4 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_delete_project_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_DeleteProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_DeleteProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py new file mode 100644 index 000000000000..8f0a502ced79 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_GetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py new file mode 100644 index 000000000000..67b21866bf5f --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_GetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_async.py new file mode 100644 index 000000000000..bc2885e974f1 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_GetProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetProjectRequest( + name="name_value", + ) + + # Make the request + response = await client.get_project(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_GetProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_sync.py new file mode 100644 index 000000000000..4d5dc0b3b144 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_get_project_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_GetProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetProjectRequest( + name="name_value", + ) + + # Make the request + response = client.get_project(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_GetProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_async.py new file mode 100644 index 000000000000..91c495fd07b7 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListProjects +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_ListProjects_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_projects(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListProjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_projects(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_ListProjects_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_sync.py new file mode 100644 index 000000000000..09d9898f7209 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_list_projects_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListProjects +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_ListProjects_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_projects(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListProjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_projects(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_ListProjects_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_async.py new file mode 100644 index 000000000000..ecdd64ebfaa2 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MoveProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_MoveProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_move_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.MoveProjectRequest( + name="name_value", + destination_parent="destination_parent_value", + ) + + # Make the request + operation = client.move_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_MoveProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_sync.py new file mode 100644 index 000000000000..37cc2cd10181 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_move_project_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 MoveProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_MoveProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_move_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.MoveProjectRequest( + name="name_value", + destination_parent="destination_parent_value", + ) + + # Make the request + operation = client.move_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_MoveProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_async.py new file mode 100644 index 000000000000..faa6502503ed --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchProjects +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_SearchProjects_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_search_projects(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchProjectsRequest( + ) + + # Make the request + page_result = client.search_projects(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_SearchProjects_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_sync.py new file mode 100644 index 000000000000..a870908f9400 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_search_projects_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SearchProjects +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_SearchProjects_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_search_projects(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.SearchProjectsRequest( + ) + + # Make the request + page_result = client.search_projects(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_SearchProjects_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py new file mode 100644 index 000000000000..d48466b9be60 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_SetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py new file mode 100644 index 000000000000..4ca4a00ec080 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_SetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py new file mode 100644 index 000000000000..e0261b7c0e4b --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_TestIamPermissions_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py new file mode 100644 index 000000000000..96d142db4d43 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_TestIamPermissions_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_async.py new file mode 100644 index 000000000000..c8183096ccb8 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_UndeleteProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_undelete_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UndeleteProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_UndeleteProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_sync.py new file mode 100644 index 000000000000..2961e89f4c2b --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_undelete_project_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UndeleteProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_UndeleteProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_undelete_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UndeleteProjectRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_UndeleteProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_async.py new file mode 100644 index 000000000000..cd9022edfbc7 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_UpdateProject_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_update_project(): + # Create a client + client = resourcemanager_v3.ProjectsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UpdateProjectRequest( + ) + + # Make the request + operation = client.update_project(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_UpdateProject_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_sync.py new file mode 100644 index 000000000000..1e19ce8d7791 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_projects_update_project_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateProject +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_Projects_UpdateProject_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_update_project(): + # Create a client + client = resourcemanager_v3.ProjectsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.UpdateProjectRequest( + ) + + # Make the request + operation = client.update_project(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_Projects_UpdateProject_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py new file mode 100644 index 000000000000..18b7eb58f0e3 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagBinding +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_tag_binding(): + # Create a client + client = resourcemanager_v3.TagBindingsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.CreateTagBindingRequest( + ) + + # Make the request + operation = client.create_tag_binding(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py new file mode 100644 index 000000000000..764063f6f3fa --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagBinding +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_tag_binding(): + # Create a client + client = resourcemanager_v3.TagBindingsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.CreateTagBindingRequest( + ) + + # Make the request + operation = client.create_tag_binding(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py new file mode 100644 index 000000000000..a05a128e7b40 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagBinding +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_tag_binding(): + # Create a client + client = resourcemanager_v3.TagBindingsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagBindingRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_binding(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py new file mode 100644 index 000000000000..2ae22e178115 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagBinding +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_tag_binding(): + # Create a client + client = resourcemanager_v3.TagBindingsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagBindingRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_binding(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py new file mode 100644 index 000000000000..7f189505ba97 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListEffectiveTags +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_effective_tags(): + # Create a client + client = resourcemanager_v3.TagBindingsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListEffectiveTagsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_effective_tags(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py new file mode 100644 index 000000000000..376b58fe81b7 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListEffectiveTags +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_effective_tags(): + # Create a client + client = resourcemanager_v3.TagBindingsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListEffectiveTagsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_effective_tags(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py new file mode 100644 index 000000000000..cf2ed15930c3 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagBindings +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_tag_bindings(): + # Create a client + client = resourcemanager_v3.TagBindingsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagBindingsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_bindings(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py new file mode 100644 index 000000000000..0b4a75069272 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagBindings +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_tag_bindings(): + # Create a client + client = resourcemanager_v3.TagBindingsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagBindingsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_bindings(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py new file mode 100644 index 000000000000..fb80a700d307 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagHold +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_tag_hold(): + # Create a client + client = resourcemanager_v3.TagHoldsAsyncClient() + + # Initialize request argument(s) + tag_hold = resourcemanager_v3.TagHold() + tag_hold.holder = "holder_value" + + request = resourcemanager_v3.CreateTagHoldRequest( + parent="parent_value", + tag_hold=tag_hold, + ) + + # Make the request + operation = client.create_tag_hold(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py new file mode 100644 index 000000000000..be3c28e005da --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagHold +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_tag_hold(): + # Create a client + client = resourcemanager_v3.TagHoldsClient() + + # Initialize request argument(s) + tag_hold = resourcemanager_v3.TagHold() + tag_hold.holder = "holder_value" + + request = resourcemanager_v3.CreateTagHoldRequest( + parent="parent_value", + tag_hold=tag_hold, + ) + + # Make the request + operation = client.create_tag_hold(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py new file mode 100644 index 000000000000..1ae6767743b7 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagHold +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_tag_hold(): + # Create a client + client = resourcemanager_v3.TagHoldsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagHoldRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_hold(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py new file mode 100644 index 000000000000..45a103a95863 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagHold +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_tag_hold(): + # Create a client + client = resourcemanager_v3.TagHoldsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagHoldRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_hold(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py new file mode 100644 index 000000000000..ff7c2ab0bb91 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagHolds +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_tag_holds(): + # Create a client + client = resourcemanager_v3.TagHoldsAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagHoldsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_holds(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py new file mode 100644 index 000000000000..bffbb75986f8 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagHolds +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_tag_holds(): + # Create a client + client = resourcemanager_v3.TagHoldsClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagHoldsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_holds(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py new file mode 100644 index 000000000000..780cbed02266 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + tag_key = resourcemanager_v3.TagKey() + tag_key.short_name = "short_name_value" + + request = resourcemanager_v3.CreateTagKeyRequest( + tag_key=tag_key, + ) + + # Make the request + operation = client.create_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py new file mode 100644 index 000000000000..ae9a49b57357 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + tag_key = resourcemanager_v3.TagKey() + tag_key.short_name = "short_name_value" + + request = resourcemanager_v3.CreateTagKeyRequest( + tag_key=tag_key, + ) + + # Make the request + operation = client.create_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py new file mode 100644 index 000000000000..714377104755 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py new file mode 100644 index 000000000000..3bea7633153c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py new file mode 100644 index 000000000000..aeb62064491e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py new file mode 100644 index 000000000000..7cbb9152241b --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py new file mode 100644 index 000000000000..796a1afd043a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetNamespacedTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_namespaced_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetNamespacedTagKeyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_namespaced_tag_key(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py new file mode 100644 index 000000000000..da7a637508fe --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetNamespacedTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_namespaced_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetNamespacedTagKeyRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespaced_tag_key(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py new file mode 100644 index 000000000000..812172849578 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetTagKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetTagKeyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_tag_key(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetTagKey_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py new file mode 100644 index 000000000000..3228ea3efd1c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_GetTagKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetTagKeyRequest( + name="name_value", + ) + + # Make the request + response = client.get_tag_key(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_GetTagKey_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py new file mode 100644 index 000000000000..922511eee66f --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagKeys +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_tag_keys(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_keys(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py new file mode 100644 index 000000000000..6ee7f60082cb --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagKeys +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_tag_keys(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_keys(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py new file mode 100644 index 000000000000..bd2f51c61be1 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py new file mode 100644 index 000000000000..9d9e820ecc3c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py new file mode 100644 index 000000000000..12ace3e95c1b --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py new file mode 100644 index 000000000000..a317572d6a21 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py new file mode 100644 index 000000000000..0eb21f1d9c7d --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_update_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysAsyncClient() + + # Initialize request argument(s) + tag_key = resourcemanager_v3.TagKey() + tag_key.short_name = "short_name_value" + + request = resourcemanager_v3.UpdateTagKeyRequest( + tag_key=tag_key, + ) + + # Make the request + operation = client.update_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py new file mode 100644 index 000000000000..b8f05c9ae87a --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateTagKey +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_update_tag_key(): + # Create a client + client = resourcemanager_v3.TagKeysClient() + + # Initialize request argument(s) + tag_key = resourcemanager_v3.TagKey() + tag_key.short_name = "short_name_value" + + request = resourcemanager_v3.UpdateTagKeyRequest( + tag_key=tag_key, + ) + + # Make the request + operation = client.update_tag_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py new file mode 100644 index 000000000000..646f938625b9 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_CreateTagValue_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_create_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + tag_value = resourcemanager_v3.TagValue() + tag_value.short_name = "short_name_value" + + request = resourcemanager_v3.CreateTagValueRequest( + tag_value=tag_value, + ) + + # Make the request + operation = client.create_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_CreateTagValue_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py new file mode 100644 index 000000000000..2ca20b7116b0 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_CreateTagValue_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_create_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + tag_value = resourcemanager_v3.TagValue() + tag_value.short_name = "short_name_value" + + request = resourcemanager_v3.CreateTagValueRequest( + tag_value=tag_value, + ) + + # Make the request + operation = client.create_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_CreateTagValue_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py new file mode 100644 index 000000000000..2f9b8ad33636 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_delete_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagValueRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py new file mode 100644 index 000000000000..e7f6a236a775 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_delete_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = resourcemanager_v3.DeleteTagValueRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py new file mode 100644 index 000000000000..1f05b733fc7c --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py new file mode 100644 index 000000000000..0a345a3b1a08 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py new file mode 100644 index 000000000000..3d677f02b6f3 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetNamespacedTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_namespaced_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetNamespacedTagValueRequest( + name="name_value", + ) + + # Make the request + response = await client.get_namespaced_tag_value(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py new file mode 100644 index 000000000000..9b292e970a64 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetNamespacedTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_namespaced_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetNamespacedTagValueRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespaced_tag_value(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py new file mode 100644 index 000000000000..473529c083d1 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetTagValue_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_get_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetTagValueRequest( + name="name_value", + ) + + # Make the request + response = await client.get_tag_value(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetTagValue_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py new file mode 100644 index 000000000000..67eabb239340 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_GetTagValue_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_get_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = resourcemanager_v3.GetTagValueRequest( + name="name_value", + ) + + # Make the request + response = client.get_tag_value(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_GetTagValue_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py new file mode 100644 index 000000000000..2436e0be0a5e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagValues +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_ListTagValues_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_list_tag_values(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagValuesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_values(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_ListTagValues_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py new file mode 100644 index 000000000000..0af290767cbd --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListTagValues +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_ListTagValues_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_list_tag_values(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = resourcemanager_v3.ListTagValuesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tag_values(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_ListTagValues_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py new file mode 100644 index 000000000000..385ccfe91295 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py new file mode 100644 index 000000000000..77abd02683d1 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py new file mode 100644 index 000000000000..67e708307a81 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py new file mode 100644 index 000000000000..509c9b6a1cba --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py new file mode 100644 index 000000000000..d75bcf2869b3 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +async def sample_update_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesAsyncClient() + + # Initialize request argument(s) + tag_value = resourcemanager_v3.TagValue() + tag_value.short_name = "short_name_value" + + request = resourcemanager_v3.UpdateTagValueRequest( + tag_value=tag_value, + ) + + # Make the request + operation = client.update_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_async] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py new file mode 100644 index 000000000000..b04b40a493f3 --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateTagValue +# 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-resource-manager + + +# [START cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcemanager_v3 + + +def sample_update_tag_value(): + # Create a client + client = resourcemanager_v3.TagValuesClient() + + # Initialize request argument(s) + tag_value = resourcemanager_v3.TagValue() + tag_value.short_name = "short_name_value" + + request = resourcemanager_v3.UpdateTagValueRequest( + tag_value=tag_value, + ) + + # Make the request + operation = client.update_tag_value(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_sync] diff --git a/packages/google-cloud-resource-manager/samples/generated_samples/snippet_metadata_google.cloud.resourcemanager.v3.json b/packages/google-cloud-resource-manager/samples/generated_samples/snippet_metadata_google.cloud.resourcemanager.v3.json new file mode 100644 index 000000000000..f05e3d14504e --- /dev/null +++ b/packages/google-cloud-resource-manager/samples/generated_samples/snippet_metadata_google.cloud.resourcemanager.v3.json @@ -0,0 +1,8483 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.resourcemanager.v3", + "version": "v3" + } + ], + "language": "PYTHON", + "name": "google-cloud-resource-manager", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.create_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.CreateFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "CreateFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateFolderRequest" + }, + { + "name": "folder", + "type": "google.cloud.resourcemanager_v3.types.Folder" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_folder" + }, + "description": "Sample for CreateFolder", + "file": "cloudresourcemanager_v3_generated_folders_create_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_CreateFolder_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_create_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.create_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.CreateFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "CreateFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateFolderRequest" + }, + { + "name": "folder", + "type": "google.cloud.resourcemanager_v3.types.Folder" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_folder" + }, + "description": "Sample for CreateFolder", + "file": "cloudresourcemanager_v3_generated_folders_create_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_CreateFolder_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_create_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.delete_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.DeleteFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "DeleteFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_folder" + }, + "description": "Sample for DeleteFolder", + "file": "cloudresourcemanager_v3_generated_folders_delete_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_DeleteFolder_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_delete_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.delete_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.DeleteFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "DeleteFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_folder" + }, + "description": "Sample for DeleteFolder", + "file": "cloudresourcemanager_v3_generated_folders_delete_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_DeleteFolder_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_delete_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.get_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.GetFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "GetFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Folder", + "shortName": "get_folder" + }, + "description": "Sample for GetFolder", + "file": "cloudresourcemanager_v3_generated_folders_get_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_GetFolder_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_get_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.get_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.GetFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "GetFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Folder", + "shortName": "get_folder" + }, + "description": "Sample for GetFolder", + "file": "cloudresourcemanager_v3_generated_folders_get_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_GetFolder_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_get_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.list_folders", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.ListFolders", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "ListFolders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListFoldersRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.folders.pagers.ListFoldersAsyncPager", + "shortName": "list_folders" + }, + "description": "Sample for ListFolders", + "file": "cloudresourcemanager_v3_generated_folders_list_folders_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_ListFolders_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_list_folders_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.list_folders", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.ListFolders", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "ListFolders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListFoldersRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.folders.pagers.ListFoldersPager", + "shortName": "list_folders" + }, + "description": "Sample for ListFolders", + "file": "cloudresourcemanager_v3_generated_folders_list_folders_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_ListFolders_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_list_folders_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.move_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.MoveFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "MoveFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.MoveFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "destination_parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "move_folder" + }, + "description": "Sample for MoveFolder", + "file": "cloudresourcemanager_v3_generated_folders_move_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_MoveFolder_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_move_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.move_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.MoveFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "MoveFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.MoveFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "destination_parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "move_folder" + }, + "description": "Sample for MoveFolder", + "file": "cloudresourcemanager_v3_generated_folders_move_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_MoveFolder_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_move_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.search_folders", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.SearchFolders", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "SearchFolders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchFoldersRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.folders.pagers.SearchFoldersAsyncPager", + "shortName": "search_folders" + }, + "description": "Sample for SearchFolders", + "file": "cloudresourcemanager_v3_generated_folders_search_folders_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_SearchFolders_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_search_folders_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.search_folders", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.SearchFolders", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "SearchFolders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchFoldersRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.folders.pagers.SearchFoldersPager", + "shortName": "search_folders" + }, + "description": "Sample for SearchFolders", + "file": "cloudresourcemanager_v3_generated_folders_search_folders_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_SearchFolders_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_search_folders_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.undelete_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.UndeleteFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "UndeleteFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UndeleteFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "undelete_folder" + }, + "description": "Sample for UndeleteFolder", + "file": "cloudresourcemanager_v3_generated_folders_undelete_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_UndeleteFolder_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_undelete_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.undelete_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.UndeleteFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "UndeleteFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UndeleteFolderRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "undelete_folder" + }, + "description": "Sample for UndeleteFolder", + "file": "cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_UndeleteFolder_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_undelete_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient", + "shortName": "FoldersAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersAsyncClient.update_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.UpdateFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "UpdateFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateFolderRequest" + }, + { + "name": "folder", + "type": "google.cloud.resourcemanager_v3.types.Folder" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_folder" + }, + "description": "Sample for UpdateFolder", + "file": "cloudresourcemanager_v3_generated_folders_update_folder_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_UpdateFolder_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_update_folder_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.FoldersClient", + "shortName": "FoldersClient" + }, + "fullName": "google.cloud.resourcemanager_v3.FoldersClient.update_folder", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Folders.UpdateFolder", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Folders", + "shortName": "Folders" + }, + "shortName": "UpdateFolder" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateFolderRequest" + }, + { + "name": "folder", + "type": "google.cloud.resourcemanager_v3.types.Folder" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_folder" + }, + "description": "Sample for UpdateFolder", + "file": "cloudresourcemanager_v3_generated_folders_update_folder_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Folders_UpdateFolder_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_folders_update_folder_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient", + "shortName": "OrganizationsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient", + "shortName": "OrganizationsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient", + "shortName": "OrganizationsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient.get_organization", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.GetOrganization", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "GetOrganization" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetOrganizationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Organization", + "shortName": "get_organization" + }, + "description": "Sample for GetOrganization", + "file": "cloudresourcemanager_v3_generated_organizations_get_organization_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_GetOrganization_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_get_organization_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient", + "shortName": "OrganizationsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient.get_organization", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.GetOrganization", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "GetOrganization" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetOrganizationRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Organization", + "shortName": "get_organization" + }, + "description": "Sample for GetOrganization", + "file": "cloudresourcemanager_v3_generated_organizations_get_organization_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_GetOrganization_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_get_organization_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient", + "shortName": "OrganizationsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient.search_organizations", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.SearchOrganizations", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "SearchOrganizations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchOrganizationsRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.organizations.pagers.SearchOrganizationsAsyncPager", + "shortName": "search_organizations" + }, + "description": "Sample for SearchOrganizations", + "file": "cloudresourcemanager_v3_generated_organizations_search_organizations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_search_organizations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient", + "shortName": "OrganizationsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient.search_organizations", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.SearchOrganizations", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "SearchOrganizations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchOrganizationsRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.organizations.pagers.SearchOrganizationsPager", + "shortName": "search_organizations" + }, + "description": "Sample for SearchOrganizations", + "file": "cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_SearchOrganizations_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_search_organizations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient", + "shortName": "OrganizationsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient", + "shortName": "OrganizationsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient", + "shortName": "OrganizationsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient", + "shortName": "OrganizationsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.OrganizationsClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Organizations.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Organizations", + "shortName": "Organizations" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Organizations_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_organizations_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.create_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.CreateProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "CreateProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateProjectRequest" + }, + { + "name": "project", + "type": "google.cloud.resourcemanager_v3.types.Project" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_project" + }, + "description": "Sample for CreateProject", + "file": "cloudresourcemanager_v3_generated_projects_create_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_CreateProject_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_create_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.create_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.CreateProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "CreateProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateProjectRequest" + }, + { + "name": "project", + "type": "google.cloud.resourcemanager_v3.types.Project" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_project" + }, + "description": "Sample for CreateProject", + "file": "cloudresourcemanager_v3_generated_projects_create_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_CreateProject_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_create_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.delete_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.DeleteProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "DeleteProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_project" + }, + "description": "Sample for DeleteProject", + "file": "cloudresourcemanager_v3_generated_projects_delete_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_DeleteProject_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_delete_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.delete_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.DeleteProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "DeleteProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_project" + }, + "description": "Sample for DeleteProject", + "file": "cloudresourcemanager_v3_generated_projects_delete_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_DeleteProject_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_delete_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.get_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.GetProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "GetProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Project", + "shortName": "get_project" + }, + "description": "Sample for GetProject", + "file": "cloudresourcemanager_v3_generated_projects_get_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_GetProject_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_get_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.get_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.GetProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "GetProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.Project", + "shortName": "get_project" + }, + "description": "Sample for GetProject", + "file": "cloudresourcemanager_v3_generated_projects_get_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_GetProject_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_get_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.list_projects", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.ListProjects", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "ListProjects" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListProjectsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.projects.pagers.ListProjectsAsyncPager", + "shortName": "list_projects" + }, + "description": "Sample for ListProjects", + "file": "cloudresourcemanager_v3_generated_projects_list_projects_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_ListProjects_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_list_projects_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.list_projects", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.ListProjects", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "ListProjects" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListProjectsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.projects.pagers.ListProjectsPager", + "shortName": "list_projects" + }, + "description": "Sample for ListProjects", + "file": "cloudresourcemanager_v3_generated_projects_list_projects_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_ListProjects_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_list_projects_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.move_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.MoveProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "MoveProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.MoveProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "destination_parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "move_project" + }, + "description": "Sample for MoveProject", + "file": "cloudresourcemanager_v3_generated_projects_move_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_MoveProject_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_move_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.move_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.MoveProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "MoveProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.MoveProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "destination_parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "move_project" + }, + "description": "Sample for MoveProject", + "file": "cloudresourcemanager_v3_generated_projects_move_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_MoveProject_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_move_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.search_projects", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.SearchProjects", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "SearchProjects" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchProjectsRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.projects.pagers.SearchProjectsAsyncPager", + "shortName": "search_projects" + }, + "description": "Sample for SearchProjects", + "file": "cloudresourcemanager_v3_generated_projects_search_projects_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_SearchProjects_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_search_projects_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.search_projects", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.SearchProjects", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "SearchProjects" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.SearchProjectsRequest" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.projects.pagers.SearchProjectsPager", + "shortName": "search_projects" + }, + "description": "Sample for SearchProjects", + "file": "cloudresourcemanager_v3_generated_projects_search_projects_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_SearchProjects_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_search_projects_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.undelete_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.UndeleteProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "UndeleteProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UndeleteProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "undelete_project" + }, + "description": "Sample for UndeleteProject", + "file": "cloudresourcemanager_v3_generated_projects_undelete_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_UndeleteProject_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_undelete_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.undelete_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.UndeleteProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "UndeleteProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UndeleteProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "undelete_project" + }, + "description": "Sample for UndeleteProject", + "file": "cloudresourcemanager_v3_generated_projects_undelete_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_UndeleteProject_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_undelete_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient", + "shortName": "ProjectsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsAsyncClient.update_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.UpdateProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "UpdateProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateProjectRequest" + }, + { + "name": "project", + "type": "google.cloud.resourcemanager_v3.types.Project" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_project" + }, + "description": "Sample for UpdateProject", + "file": "cloudresourcemanager_v3_generated_projects_update_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_UpdateProject_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_update_project_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient", + "shortName": "ProjectsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.ProjectsClient.update_project", + "method": { + "fullName": "google.cloud.resourcemanager.v3.Projects.UpdateProject", + "service": { + "fullName": "google.cloud.resourcemanager.v3.Projects", + "shortName": "Projects" + }, + "shortName": "UpdateProject" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateProjectRequest" + }, + { + "name": "project", + "type": "google.cloud.resourcemanager_v3.types.Project" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_project" + }, + "description": "Sample for UpdateProject", + "file": "cloudresourcemanager_v3_generated_projects_update_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_Projects_UpdateProject_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_projects_update_project_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient", + "shortName": "TagBindingsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient.create_tag_binding", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.CreateTagBinding", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "CreateTagBinding" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagBindingRequest" + }, + { + "name": "tag_binding", + "type": "google.cloud.resourcemanager_v3.types.TagBinding" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_tag_binding" + }, + "description": "Sample for CreateTagBinding", + "file": "cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient", + "shortName": "TagBindingsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient.create_tag_binding", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.CreateTagBinding", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "CreateTagBinding" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagBindingRequest" + }, + { + "name": "tag_binding", + "type": "google.cloud.resourcemanager_v3.types.TagBinding" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_tag_binding" + }, + "description": "Sample for CreateTagBinding", + "file": "cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_create_tag_binding_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient", + "shortName": "TagBindingsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient.delete_tag_binding", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.DeleteTagBinding", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "DeleteTagBinding" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagBindingRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_tag_binding" + }, + "description": "Sample for DeleteTagBinding", + "file": "cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient", + "shortName": "TagBindingsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient.delete_tag_binding", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.DeleteTagBinding", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "DeleteTagBinding" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagBindingRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_tag_binding" + }, + "description": "Sample for DeleteTagBinding", + "file": "cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_DeleteTagBinding_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_delete_tag_binding_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient", + "shortName": "TagBindingsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient.list_effective_tags", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "ListEffectiveTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListEffectiveTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_bindings.pagers.ListEffectiveTagsAsyncPager", + "shortName": "list_effective_tags" + }, + "description": "Sample for ListEffectiveTags", + "file": "cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient", + "shortName": "TagBindingsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient.list_effective_tags", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "ListEffectiveTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListEffectiveTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_bindings.pagers.ListEffectiveTagsPager", + "shortName": "list_effective_tags" + }, + "description": "Sample for ListEffectiveTags", + "file": "cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_list_effective_tags_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient", + "shortName": "TagBindingsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsAsyncClient.list_tag_bindings", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListTagBindings", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "ListTagBindings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagBindingsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_bindings.pagers.ListTagBindingsAsyncPager", + "shortName": "list_tag_bindings" + }, + "description": "Sample for ListTagBindings", + "file": "cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient", + "shortName": "TagBindingsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagBindingsClient.list_tag_bindings", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListTagBindings", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagBindings", + "shortName": "TagBindings" + }, + "shortName": "ListTagBindings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagBindingsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_bindings.pagers.ListTagBindingsPager", + "shortName": "list_tag_bindings" + }, + "description": "Sample for ListTagBindings", + "file": "cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_bindings_list_tag_bindings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient", + "shortName": "TagHoldsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient.create_tag_hold", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.CreateTagHold", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "CreateTagHold" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagHoldRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag_hold", + "type": "google.cloud.resourcemanager_v3.types.TagHold" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_tag_hold" + }, + "description": "Sample for CreateTagHold", + "file": "cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient", + "shortName": "TagHoldsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient.create_tag_hold", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.CreateTagHold", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "CreateTagHold" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagHoldRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag_hold", + "type": "google.cloud.resourcemanager_v3.types.TagHold" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_tag_hold" + }, + "description": "Sample for CreateTagHold", + "file": "cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_create_tag_hold_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient", + "shortName": "TagHoldsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient.delete_tag_hold", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "DeleteTagHold" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagHoldRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_tag_hold" + }, + "description": "Sample for DeleteTagHold", + "file": "cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient", + "shortName": "TagHoldsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient.delete_tag_hold", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "DeleteTagHold" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagHoldRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_tag_hold" + }, + "description": "Sample for DeleteTagHold", + "file": "cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_delete_tag_hold_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient", + "shortName": "TagHoldsAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsAsyncClient.list_tag_holds", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.ListTagHolds", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "ListTagHolds" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagHoldsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_holds.pagers.ListTagHoldsAsyncPager", + "shortName": "list_tag_holds" + }, + "description": "Sample for ListTagHolds", + "file": "cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient", + "shortName": "TagHoldsClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagHoldsClient.list_tag_holds", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds.ListTagHolds", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagHolds", + "shortName": "TagHolds" + }, + "shortName": "ListTagHolds" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagHoldsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_holds.pagers.ListTagHoldsPager", + "shortName": "list_tag_holds" + }, + "description": "Sample for ListTagHolds", + "file": "cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_holds_list_tag_holds_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.create_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.CreateTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "CreateTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagKeyRequest" + }, + { + "name": "tag_key", + "type": "google.cloud.resourcemanager_v3.types.TagKey" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_tag_key" + }, + "description": "Sample for CreateTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_create_tag_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.create_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.CreateTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "CreateTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagKeyRequest" + }, + { + "name": "tag_key", + "type": "google.cloud.resourcemanager_v3.types.TagKey" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_tag_key" + }, + "description": "Sample for CreateTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_create_tag_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.delete_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.DeleteTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "DeleteTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_tag_key" + }, + "description": "Sample for DeleteTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.delete_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.DeleteTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "DeleteTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_tag_key" + }, + "description": "Sample for DeleteTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_DeleteTagKey_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_delete_tag_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.get_namespaced_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetNamespacedTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetNamespacedTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagKey", + "shortName": "get_namespaced_tag_key" + }, + "description": "Sample for GetNamespacedTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.get_namespaced_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetNamespacedTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetNamespacedTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagKey", + "shortName": "get_namespaced_tag_key" + }, + "description": "Sample for GetNamespacedTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_namespaced_tag_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.get_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagKey", + "shortName": "get_tag_key" + }, + "description": "Sample for GetTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetTagKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.get_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "GetTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetTagKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagKey", + "shortName": "get_tag_key" + }, + "description": "Sample for GetTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetTagKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_get_tag_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.list_tag_keys", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.ListTagKeys", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "ListTagKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_keys.pagers.ListTagKeysAsyncPager", + "shortName": "list_tag_keys" + }, + "description": "Sample for ListTagKeys", + "file": "cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.list_tag_keys", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.ListTagKeys", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "ListTagKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_keys.pagers.ListTagKeysPager", + "shortName": "list_tag_keys" + }, + "description": "Sample for ListTagKeys", + "file": "cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_list_tag_keys_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient", + "shortName": "TagKeysAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysAsyncClient.update_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.UpdateTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "UpdateTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateTagKeyRequest" + }, + { + "name": "tag_key", + "type": "google.cloud.resourcemanager_v3.types.TagKey" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_tag_key" + }, + "description": "Sample for UpdateTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_update_tag_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient", + "shortName": "TagKeysClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagKeysClient.update_tag_key", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys.UpdateTagKey", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagKeys", + "shortName": "TagKeys" + }, + "shortName": "UpdateTagKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateTagKeyRequest" + }, + { + "name": "tag_key", + "type": "google.cloud.resourcemanager_v3.types.TagKey" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_tag_key" + }, + "description": "Sample for UpdateTagKey", + "file": "cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_UpdateTagKey_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_keys_update_tag_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.create_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.CreateTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "CreateTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagValueRequest" + }, + { + "name": "tag_value", + "type": "google.cloud.resourcemanager_v3.types.TagValue" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_tag_value" + }, + "description": "Sample for CreateTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_CreateTagValue_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_create_tag_value_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.create_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.CreateTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "CreateTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.CreateTagValueRequest" + }, + { + "name": "tag_value", + "type": "google.cloud.resourcemanager_v3.types.TagValue" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_tag_value" + }, + "description": "Sample for CreateTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_CreateTagValue_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_create_tag_value_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.delete_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.DeleteTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "DeleteTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_tag_value" + }, + "description": "Sample for DeleteTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_delete_tag_value_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.delete_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.DeleteTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "DeleteTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.DeleteTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_tag_value" + }, + "description": "Sample for DeleteTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_DeleteTagValue_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_delete_tag_value_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.get_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.get_namespaced_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetNamespacedTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetNamespacedTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagValue", + "shortName": "get_namespaced_tag_value" + }, + "description": "Sample for GetNamespacedTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.get_namespaced_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetNamespacedTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetNamespacedTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagValue", + "shortName": "get_namespaced_tag_value" + }, + "description": "Sample for GetNamespacedTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_namespaced_tag_value_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.get_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagValue", + "shortName": "get_tag_value" + }, + "description": "Sample for GetTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetTagValue_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_tag_value_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.get_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "GetTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.GetTagValueRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.types.TagValue", + "shortName": "get_tag_value" + }, + "description": "Sample for GetTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetTagValue_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_get_tag_value_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.list_tag_values", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.ListTagValues", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "ListTagValues" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagValuesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_values.pagers.ListTagValuesAsyncPager", + "shortName": "list_tag_values" + }, + "description": "Sample for ListTagValues", + "file": "cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_ListTagValues_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_list_tag_values_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.list_tag_values", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.ListTagValues", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "ListTagValues" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.ListTagValuesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcemanager_v3.services.tag_values.pagers.ListTagValuesPager", + "shortName": "list_tag_values" + }, + "description": "Sample for ListTagValues", + "file": "cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_ListTagValues_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_list_tag_values_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.set_iam_policy", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.SetIamPolicy", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.TestIamPermissions", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient", + "shortName": "TagValuesAsyncClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesAsyncClient.update_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.UpdateTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "UpdateTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateTagValueRequest" + }, + { + "name": "tag_value", + "type": "google.cloud.resourcemanager_v3.types.TagValue" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_tag_value" + }, + "description": "Sample for UpdateTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_update_tag_value_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient", + "shortName": "TagValuesClient" + }, + "fullName": "google.cloud.resourcemanager_v3.TagValuesClient.update_tag_value", + "method": { + "fullName": "google.cloud.resourcemanager.v3.TagValues.UpdateTagValue", + "service": { + "fullName": "google.cloud.resourcemanager.v3.TagValues", + "shortName": "TagValues" + }, + "shortName": "UpdateTagValue" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcemanager_v3.types.UpdateTagValueRequest" + }, + { + "name": "tag_value", + "type": "google.cloud.resourcemanager_v3.types.TagValue" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_tag_value" + }, + "description": "Sample for UpdateTagValue", + "file": "cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudresourcemanager_v3_generated_TagValues_UpdateTagValue_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudresourcemanager_v3_generated_tag_values_update_tag_value_sync.py" + } + ] +} diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_folders.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_folders.py index 042835548655..02065c130df3 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_folders.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_folders.py @@ -1269,9 +1269,11 @@ async def test_list_folders_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_folders(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1625,9 +1627,11 @@ async def test_search_folders_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_folders(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_organizations.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_organizations.py index 2ce28e2b19cd..6771384060fc 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_organizations.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_organizations.py @@ -1324,9 +1324,11 @@ async def test_search_organizations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_organizations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_projects.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_projects.py index fcb5060e4182..3a65af45022e 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_projects.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_projects.py @@ -1282,9 +1282,11 @@ async def test_list_projects_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_projects(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1638,9 +1640,11 @@ async def test_search_projects_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_projects(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_bindings.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_bindings.py index a15963c8ffb2..3ef9ba1b4c51 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_bindings.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_bindings.py @@ -1059,9 +1059,11 @@ async def test_list_tag_bindings_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tag_bindings(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1848,9 +1850,11 @@ async def test_list_effective_tags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_effective_tags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_holds.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_holds.py index eddaaaec2443..b33ab6c87bee 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_holds.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_holds.py @@ -1556,9 +1556,11 @@ async def test_list_tag_holds_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tag_holds(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_keys.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_keys.py index a7e3b0d4a946..2320692db802 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_keys.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_keys.py @@ -1027,9 +1027,11 @@ async def test_list_tag_keys_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tag_keys(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_values.py b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_values.py index 48cb67311e3f..db9d160d87f7 100644 --- a/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_values.py +++ b/packages/google-cloud-resource-manager/tests/unit/gapic/resourcemanager_v3/test_tag_values.py @@ -1044,9 +1044,11 @@ async def test_list_tag_values_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tag_values(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-resource-settings/google/cloud/resourcesettings/gapic_version.py b/packages/google-cloud-resource-settings/google/cloud/resourcesettings/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-resource-settings/google/cloud/resourcesettings/gapic_version.py +++ b/packages/google-cloud-resource-settings/google/cloud/resourcesettings/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/gapic_version.py b/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/gapic_version.py +++ b/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/services/resource_settings_service/async_client.py b/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/services/resource_settings_service/async_client.py index 74a094569400..ef607bfdd70c 100644 --- a/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/services/resource_settings_service/async_client.py +++ b/packages/google-cloud-resource-settings/google/cloud/resourcesettings_v1/services/resource_settings_service/async_client.py @@ -577,7 +577,7 @@ async def sample_update_setting(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ResourceSettingsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-resource-settings/noxfile.py b/packages/google-cloud-resource-settings/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-resource-settings/noxfile.py +++ b/packages/google-cloud-resource-settings/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_async.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_async.py new file mode 100644 index 000000000000..903e8b21035c --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSetting +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_GetSetting_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +async def sample_get_setting(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceAsyncClient() + + # Initialize request argument(s) + request = resourcesettings_v1.GetSettingRequest( + name="name_value", + ) + + # Make the request + response = await client.get_setting(request=request) + + # Handle the response + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_GetSetting_async] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py new file mode 100644 index 000000000000..dc377e5504a4 --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSetting +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_GetSetting_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +def sample_get_setting(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceClient() + + # Initialize request argument(s) + request = resourcesettings_v1.GetSettingRequest( + name="name_value", + ) + + # Make the request + response = client.get_setting(request=request) + + # Handle the response + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_GetSetting_sync] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_async.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_async.py new file mode 100644 index 000000000000..f8c1ecf8ebbf --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSettings +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_ListSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +async def sample_list_settings(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceAsyncClient() + + # Initialize request argument(s) + request = resourcesettings_v1.ListSettingsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_settings(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_ListSettings_async] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py new file mode 100644 index 000000000000..7552386e6565 --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSettings +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_ListSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +def sample_list_settings(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceClient() + + # Initialize request argument(s) + request = resourcesettings_v1.ListSettingsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_settings(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_ListSettings_sync] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_async.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_async.py new file mode 100644 index 000000000000..567260382bd2 --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSetting +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +async def sample_update_setting(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceAsyncClient() + + # Initialize request argument(s) + request = resourcesettings_v1.UpdateSettingRequest( + ) + + # Make the request + response = await client.update_setting(request=request) + + # Handle the response + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_async] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py new file mode 100644 index 000000000000..ef93a8b8157f --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSetting +# 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-resource-settings + + +# [START resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import resourcesettings_v1 + + +def sample_update_setting(): + # Create a client + client = resourcesettings_v1.ResourceSettingsServiceClient() + + # Initialize request argument(s) + request = resourcesettings_v1.UpdateSettingRequest( + ) + + # Make the request + response = client.update_setting(request=request) + + # Handle the response + print(response) + +# [END resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_sync] diff --git a/packages/google-cloud-resource-settings/samples/generated_samples/snippet_metadata_google.cloud.resourcesettings.v1.json b/packages/google-cloud-resource-settings/samples/generated_samples/snippet_metadata_google.cloud.resourcesettings.v1.json new file mode 100644 index 000000000000..3465a96568ae --- /dev/null +++ b/packages/google-cloud-resource-settings/samples/generated_samples/snippet_metadata_google.cloud.resourcesettings.v1.json @@ -0,0 +1,490 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.resourcesettings.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-resource-settings", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient", + "shortName": "ResourceSettingsServiceAsyncClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient.get_setting", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.GetSetting", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "GetSetting" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.GetSettingRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.types.Setting", + "shortName": "get_setting" + }, + "description": "Sample for GetSetting", + "file": "resourcesettings_v1_generated_resource_settings_service_get_setting_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_GetSetting_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_get_setting_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient", + "shortName": "ResourceSettingsServiceClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient.get_setting", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.GetSetting", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "GetSetting" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.GetSettingRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.types.Setting", + "shortName": "get_setting" + }, + "description": "Sample for GetSetting", + "file": "resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_GetSetting_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_get_setting_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient", + "shortName": "ResourceSettingsServiceAsyncClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient.list_settings", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.ListSettings", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "ListSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.ListSettingsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.services.resource_settings_service.pagers.ListSettingsAsyncPager", + "shortName": "list_settings" + }, + "description": "Sample for ListSettings", + "file": "resourcesettings_v1_generated_resource_settings_service_list_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_ListSettings_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_list_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient", + "shortName": "ResourceSettingsServiceClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient.list_settings", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.ListSettings", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "ListSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.ListSettingsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.services.resource_settings_service.pagers.ListSettingsPager", + "shortName": "list_settings" + }, + "description": "Sample for ListSettings", + "file": "resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_ListSettings_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_list_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient", + "shortName": "ResourceSettingsServiceAsyncClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceAsyncClient.update_setting", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.UpdateSetting", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "UpdateSetting" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.UpdateSettingRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.types.Setting", + "shortName": "update_setting" + }, + "description": "Sample for UpdateSetting", + "file": "resourcesettings_v1_generated_resource_settings_service_update_setting_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_update_setting_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient", + "shortName": "ResourceSettingsServiceClient" + }, + "fullName": "google.cloud.resourcesettings_v1.ResourceSettingsServiceClient.update_setting", + "method": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService.UpdateSetting", + "service": { + "fullName": "google.cloud.resourcesettings.v1.ResourceSettingsService", + "shortName": "ResourceSettingsService" + }, + "shortName": "UpdateSetting" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.resourcesettings_v1.types.UpdateSettingRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.resourcesettings_v1.types.Setting", + "shortName": "update_setting" + }, + "description": "Sample for UpdateSetting", + "file": "resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "resourcesettings_v1_generated_ResourceSettingsService_UpdateSetting_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "resourcesettings_v1_generated_resource_settings_service_update_setting_sync.py" + } + ] +} diff --git a/packages/google-cloud-resource-settings/tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py b/packages/google-cloud-resource-settings/tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py index 7ac37021d928..769339350cee 100644 --- a/packages/google-cloud-resource-settings/tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py +++ b/packages/google-cloud-resource-settings/tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py @@ -1162,9 +1162,11 @@ async def test_list_settings_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_settings(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-secret-manager/google/cloud/secretmanager/gapic_version.py b/packages/google-cloud-secret-manager/google/cloud/secretmanager/gapic_version.py index 8edfaef7141c..30274cc6e9dd 100644 --- a/packages/google-cloud-secret-manager/google/cloud/secretmanager/gapic_version.py +++ b/packages/google-cloud-secret-manager/google/cloud/secretmanager/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/gapic_version.py b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/gapic_version.py index 8edfaef7141c..30274cc6e9dd 100644 --- a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/gapic_version.py +++ b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/services/secret_manager_service/async_client.py b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/services/secret_manager_service/async_client.py index 34ed292f7e2b..d18edafde2cb 100644 --- a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/services/secret_manager_service/async_client.py +++ b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/services/secret_manager_service/async_client.py @@ -1994,7 +1994,7 @@ async def sample_test_iam_permissions(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SecretManagerServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/gapic_version.py b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/gapic_version.py index 8edfaef7141c..30274cc6e9dd 100644 --- a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/gapic_version.py +++ b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/services/secret_manager_service/async_client.py b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/services/secret_manager_service/async_client.py index e972a9e08e3c..4594d8616c29 100644 --- a/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/services/secret_manager_service/async_client.py +++ b/packages/google-cloud-secret-manager/google/cloud/secretmanager_v1beta1/services/secret_manager_service/async_client.py @@ -1982,7 +1982,7 @@ async def sample_test_iam_permissions(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SecretManagerServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-secret-manager/noxfile.py b/packages/google-cloud-secret-manager/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-secret-manager/noxfile.py +++ b/packages/google-cloud-secret-manager/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py new file mode 100644 index 000000000000..788b8dad87ba --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AccessSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_access_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.AccessSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.access_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py new file mode 100644 index 000000000000..f984767ebac8 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AccessSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_access_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.AccessSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.access_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py new file mode 100644 index 000000000000..236b97c1e21e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AddSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_add_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.AddSecretVersionRequest( + parent="parent_value", + ) + + # Make the request + response = await client.add_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py new file mode 100644 index 000000000000..55292b203e87 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AddSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_AddSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_add_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.AddSecretVersionRequest( + parent="parent_value", + ) + + # Make the request + response = client.add_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_async.py new file mode 100644 index 000000000000..864f2266925e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_CreateSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_create_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.CreateSecretRequest( + parent="parent_value", + secret_id="secret_id_value", + ) + + # Make the request + response = await client.create_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_CreateSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_sync.py new file mode 100644 index 000000000000..8efaac8694e9 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_create_secret_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_CreateSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_create_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.CreateSecretRequest( + parent="parent_value", + secret_id="secret_id_value", + ) + + # Make the request + response = client.create_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_CreateSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_async.py new file mode 100644 index 000000000000..b271c1cdfb4b --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DeleteSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_delete_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.DeleteSecretRequest( + name="name_value", + ) + + # Make the request + await client.delete_secret(request=request) + + +# [END secretmanager_v1_generated_SecretManagerService_DeleteSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py new file mode 100644 index 000000000000..dabb6858621e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DeleteSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_delete_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.DeleteSecretRequest( + name="name_value", + ) + + # Make the request + client.delete_secret(request=request) + + +# [END secretmanager_v1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py new file mode 100644 index 000000000000..a4b1a65f768f --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DestroySecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_destroy_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.DestroySecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.destroy_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py new file mode 100644 index 000000000000..3c2a0bf564de --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DestroySecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_destroy_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.DestroySecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.destroy_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py new file mode 100644 index 000000000000..d33abff74844 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_disable_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.DisableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.disable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py new file mode 100644 index 000000000000..ee826b9787a2 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_disable_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.DisableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.disable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py new file mode 100644 index 000000000000..5b365cbfd6c4 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_enable_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.EnableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.enable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py new file mode 100644 index 000000000000..18cd36e8f372 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_enable_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.EnableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.enable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py new file mode 100644 index 000000000000..5fb6e61d2f04 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetIamPolicy_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py new file mode 100644 index 000000000000..39b6b3437086 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_async.py new file mode 100644 index 000000000000..01ce74e0d70e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_get_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.GetSecretRequest( + name="name_value", + ) + + # Make the request + response = await client.get_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_sync.py new file mode 100644 index 000000000000..0435ce01af93 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_get_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.GetSecretRequest( + name="name_value", + ) + + # Make the request + response = client.get_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py new file mode 100644 index 000000000000..928aaf996cbd --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_get_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.GetSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py new file mode 100644 index 000000000000..0619db60b2eb --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecretVersion +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_GetSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_get_secret_version(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.GetSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.get_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py new file mode 100644 index 000000000000..9d861f268930 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecretVersions +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_ListSecretVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_list_secret_versions(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.ListSecretVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secret_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_ListSecretVersions_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py new file mode 100644 index 000000000000..f9ae03c31c64 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecretVersions +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_ListSecretVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_list_secret_versions(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.ListSecretVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secret_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_async.py new file mode 100644 index 000000000000..35bcdca634ce --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecrets +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_ListSecrets_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_list_secrets(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.ListSecretsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secrets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_ListSecrets_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py new file mode 100644 index 000000000000..7a19ebeedd75 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecrets +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_ListSecrets_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_list_secrets(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.ListSecretsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secrets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_ListSecrets_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py new file mode 100644 index 000000000000..83c9df418689 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_SetIamPolicy_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py new file mode 100644 index 000000000000..2d5e7e483d17 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py new file mode 100644 index 000000000000..a712a22a345b --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_TestIamPermissions_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py new file mode 100644 index 000000000000..4d93cdbe9048 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_async.py new file mode 100644 index 000000000000..7e94c8c6f729 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +async def sample_update_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1.UpdateSecretRequest( + ) + + # Make the request + response = await client.update_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_UpdateSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_sync.py new file mode 100644 index 000000000000..56d44fd9abb0 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1_generated_secret_manager_service_update_secret_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSecret +# 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-secret-manager + + +# [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1 + + +def sample_update_secret(): + # Create a client + client = secretmanager_v1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1.UpdateSecretRequest( + ) + + # Make the request + response = client.update_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py new file mode 100644 index 000000000000..d599ed7c0614 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AccessSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_access_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.AccessSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.access_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py new file mode 100644 index 000000000000..af8c1d0f1577 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AccessSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_access_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.AccessSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.access_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py new file mode 100644 index 000000000000..7a5a7f18a9b5 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AddSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_add_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.AddSecretVersionRequest( + parent="parent_value", + ) + + # Make the request + response = await client.add_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py new file mode 100644 index 000000000000..346450ae1245 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AddSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_add_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.AddSecretVersionRequest( + parent="parent_value", + ) + + # Make the request + response = client.add_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py new file mode 100644 index 000000000000..bbec0679c5b2 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_create_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.CreateSecretRequest( + parent="parent_value", + secret_id="secret_id_value", + ) + + # Make the request + response = await client.create_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py new file mode 100644 index 000000000000..4586bd353358 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 CreateSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_create_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.CreateSecretRequest( + parent="parent_value", + secret_id="secret_id_value", + ) + + # Make the request + response = client.create_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py new file mode 100644 index 000000000000..a62fe1a4abb5 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_delete_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DeleteSecretRequest( + name="name_value", + ) + + # Make the request + await client.delete_secret(request=request) + + +# [END secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py new file mode 100644 index 000000000000..0b0f7c7b06ec --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DeleteSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_delete_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DeleteSecretRequest( + name="name_value", + ) + + # Make the request + client.delete_secret(request=request) + + +# [END secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py new file mode 100644 index 000000000000..2058d09d29c9 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DestroySecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_destroy_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DestroySecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.destroy_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py new file mode 100644 index 000000000000..89be1920af5b --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DestroySecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_destroy_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DestroySecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.destroy_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py new file mode 100644 index 000000000000..6c30144a62b6 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_disable_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DisableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.disable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py new file mode 100644 index 000000000000..0f460f609a81 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DisableSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_disable_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.DisableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.disable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py new file mode 100644 index 000000000000..757a04a281ea --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_enable_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.EnableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.enable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py new file mode 100644 index 000000000000..b516b3b38c5c --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 EnableSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_enable_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.EnableSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.enable_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py new file mode 100644 index 000000000000..f7fc2500dfa9 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py new file mode 100644 index 000000000000..d08d6b13b99a --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetIamPolicy +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py new file mode 100644 index 000000000000..0c2df85689e0 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_get_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.GetSecretRequest( + name="name_value", + ) + + # Make the request + response = await client.get_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py new file mode 100644 index 000000000000..984fb8c75a2d --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_get_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.GetSecretRequest( + name="name_value", + ) + + # Make the request + response = client.get_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py new file mode 100644 index 000000000000..59eaf1b0c72c --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_get_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.GetSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py new file mode 100644 index 000000000000..04e9366aa09d --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 GetSecretVersion +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_get_secret_version(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.GetSecretVersionRequest( + name="name_value", + ) + + # Make the request + response = client.get_secret_version(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py new file mode 100644 index 000000000000..a8dcfcd3fd4e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecretVersions +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_list_secret_versions(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.ListSecretVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secret_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py new file mode 100644 index 000000000000..d8b9c59d9def --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecretVersions +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_list_secret_versions(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.ListSecretVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secret_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py new file mode 100644 index 000000000000..7ea9a570f91e --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecrets +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_list_secrets(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.ListSecretsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secrets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py new file mode 100644 index 000000000000..8a7041462b6d --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ListSecrets +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_list_secrets(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.ListSecretsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_secrets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py new file mode 100644 index 000000000000..bfe08e692322 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py new file mode 100644 index 000000000000..621643519cab --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SetIamPolicy +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py new file mode 100644 index 000000000000..1342ec603638 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py new file mode 100644 index 000000000000..fa73cb785c7b --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 TestIamPermissions +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py new file mode 100644 index 000000000000..508ea9c01e6d --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +async def sample_update_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceAsyncClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.UpdateSecretRequest( + ) + + # Make the request + response = await client.update_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_async] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py new file mode 100644 index 000000000000..8ddcbe762587 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 UpdateSecret +# 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-secretmanager + + +# [START secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import secretmanager_v1beta1 + + +def sample_update_secret(): + # Create a client + client = secretmanager_v1beta1.SecretManagerServiceClient() + + # Initialize request argument(s) + request = secretmanager_v1beta1.UpdateSecretRequest( + ) + + # Make the request + response = client.update_secret(request=request) + + # Handle the response + print(response) + +# [END secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secretmanager.v1.json b/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secretmanager.v1.json new file mode 100644 index 000000000000..fb38dd2243a0 --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secretmanager.v1.json @@ -0,0 +1,2432 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.secretmanager.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-secret-manager", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.access_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AccessSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.AccessSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.AccessSecretVersionResponse", + "shortName": "access_secret_version" + }, + "description": "Sample for AccessSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_access_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.access_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AccessSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.AccessSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.AccessSecretVersionResponse", + "shortName": "access_secret_version" + }, + "description": "Sample for AccessSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_access_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.add_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AddSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.AddSecretVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "payload", + "type": "google.cloud.secretmanager_v1.types.SecretPayload" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "add_secret_version" + }, + "description": "Sample for AddSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_add_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.add_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AddSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.AddSecretVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "payload", + "type": "google.cloud.secretmanager_v1.types.SecretPayload" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "add_secret_version" + }, + "description": "Sample for AddSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_AddSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_add_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.create_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.CreateSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "CreateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.CreateSecretRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "secret_id", + "type": "str" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1.types.Secret" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "create_secret" + }, + "description": "Sample for CreateSecret", + "file": "secretmanager_v1_generated_secret_manager_service_create_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_CreateSecret_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_create_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.create_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.CreateSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "CreateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.CreateSecretRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "secret_id", + "type": "str" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1.types.Secret" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "create_secret" + }, + "description": "Sample for CreateSecret", + "file": "secretmanager_v1_generated_secret_manager_service_create_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_CreateSecret_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_create_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.delete_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DeleteSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DeleteSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_secret" + }, + "description": "Sample for DeleteSecret", + "file": "secretmanager_v1_generated_secret_manager_service_delete_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DeleteSecret_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_delete_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.delete_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DeleteSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DeleteSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_secret" + }, + "description": "Sample for DeleteSecret", + "file": "secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DeleteSecret_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_delete_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.destroy_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DestroySecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DestroySecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "destroy_secret_version" + }, + "description": "Sample for DestroySecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_destroy_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.destroy_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DestroySecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DestroySecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "destroy_secret_version" + }, + "description": "Sample for DestroySecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_destroy_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.disable_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DisableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DisableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "disable_secret_version" + }, + "description": "Sample for DisableSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_disable_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.disable_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DisableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.DisableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "disable_secret_version" + }, + "description": "Sample for DisableSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_disable_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.enable_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "EnableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.EnableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "enable_secret_version" + }, + "description": "Sample for EnableSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_enable_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.enable_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "EnableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.EnableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "enable_secret_version" + }, + "description": "Sample for EnableSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_enable_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetIamPolicy", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.get_iam_policy", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetIamPolicy", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.get_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.GetSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "get_secret_version" + }, + "description": "Sample for GetSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.get_secret_version", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.GetSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.SecretVersion", + "shortName": "get_secret_version" + }, + "description": "Sample for GetSecretVersion", + "file": "secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.get_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.GetSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "get_secret" + }, + "description": "Sample for GetSecret", + "file": "secretmanager_v1_generated_secret_manager_service_get_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetSecret_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.get_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.GetSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.GetSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "get_secret" + }, + "description": "Sample for GetSecret", + "file": "secretmanager_v1_generated_secret_manager_service_get_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_GetSecret_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_get_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.list_secret_versions", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecretVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.ListSecretVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.services.secret_manager_service.pagers.ListSecretVersionsAsyncPager", + "shortName": "list_secret_versions" + }, + "description": "Sample for ListSecretVersions", + "file": "secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_ListSecretVersions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_list_secret_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.list_secret_versions", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecretVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.ListSecretVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.services.secret_manager_service.pagers.ListSecretVersionsPager", + "shortName": "list_secret_versions" + }, + "description": "Sample for ListSecretVersions", + "file": "secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_ListSecretVersions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_list_secret_versions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.list_secrets", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.ListSecrets", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecrets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.ListSecretsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.services.secret_manager_service.pagers.ListSecretsAsyncPager", + "shortName": "list_secrets" + }, + "description": "Sample for ListSecrets", + "file": "secretmanager_v1_generated_secret_manager_service_list_secrets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_ListSecrets_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_list_secrets_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.list_secrets", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.ListSecrets", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecrets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.ListSecretsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.services.secret_manager_service.pagers.ListSecretsPager", + "shortName": "list_secrets" + }, + "description": "Sample for ListSecrets", + "file": "secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_ListSecrets_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_list_secrets_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.SetIamPolicy", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.set_iam_policy", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.SetIamPolicy", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.TestIamPermissions", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.TestIamPermissions", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceAsyncClient.update_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "UpdateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.UpdateSecretRequest" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1.types.Secret" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "update_secret" + }, + "description": "Sample for UpdateSecret", + "file": "secretmanager_v1_generated_secret_manager_service_update_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_UpdateSecret_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_update_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1.SecretManagerServiceClient.update_secret", + "method": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret", + "service": { + "fullName": "google.cloud.secretmanager.v1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "UpdateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1.types.UpdateSecretRequest" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1.types.Secret" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1.types.Secret", + "shortName": "update_secret" + }, + "description": "Sample for UpdateSecret", + "file": "secretmanager_v1_generated_secret_manager_service_update_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1_generated_secret_manager_service_update_secret_sync.py" + } + ] +} diff --git a/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secrets.v1beta1.json b/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secrets.v1beta1.json new file mode 100644 index 000000000000..52f1d4e38bcf --- /dev/null +++ b/packages/google-cloud-secret-manager/samples/generated_samples/snippet_metadata_google.cloud.secrets.v1beta1.json @@ -0,0 +1,2432 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.secrets.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-secretmanager", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.access_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AccessSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.AccessSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.AccessSecretVersionResponse", + "shortName": "access_secret_version" + }, + "description": "Sample for AccessSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.access_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AccessSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.AccessSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.AccessSecretVersionResponse", + "shortName": "access_secret_version" + }, + "description": "Sample for AccessSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_access_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.add_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AddSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.AddSecretVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "payload", + "type": "google.cloud.secretmanager_v1beta1.types.SecretPayload" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "add_secret_version" + }, + "description": "Sample for AddSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.add_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "AddSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.AddSecretVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "payload", + "type": "google.cloud.secretmanager_v1beta1.types.SecretPayload" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "add_secret_version" + }, + "description": "Sample for AddSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_add_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.create_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "CreateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.CreateSecretRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "secret_id", + "type": "str" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1beta1.types.Secret" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "create_secret" + }, + "description": "Sample for CreateSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_create_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.create_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "CreateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.CreateSecretRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "secret_id", + "type": "str" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1beta1.types.Secret" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "create_secret" + }, + "description": "Sample for CreateSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_create_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.delete_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DeleteSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DeleteSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_secret" + }, + "description": "Sample for DeleteSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_delete_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.delete_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DeleteSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DeleteSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_secret" + }, + "description": "Sample for DeleteSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_delete_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.destroy_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DestroySecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DestroySecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "destroy_secret_version" + }, + "description": "Sample for DestroySecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.destroy_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DestroySecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DestroySecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "destroy_secret_version" + }, + "description": "Sample for DestroySecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_destroy_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.disable_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DisableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DisableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "disable_secret_version" + }, + "description": "Sample for DisableSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.disable_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "DisableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.DisableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "disable_secret_version" + }, + "description": "Sample for DisableSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_disable_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.enable_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "EnableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.EnableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "enable_secret_version" + }, + "description": "Sample for EnableSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.enable_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "EnableSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.EnableSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "enable_secret_version" + }, + "description": "Sample for EnableSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_enable_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetIamPolicy", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.get_iam_policy", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetIamPolicy", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.get_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.GetSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "get_secret_version" + }, + "description": "Sample for GetSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.get_secret_version", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecretVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.GetSecretVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.SecretVersion", + "shortName": "get_secret_version" + }, + "description": "Sample for GetSecretVersion", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.get_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.GetSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "get_secret" + }, + "description": "Sample for GetSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecret_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.get_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "GetSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.GetSecretRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "get_secret" + }, + "description": "Sample for GetSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_get_secret_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.list_secret_versions", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecretVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.ListSecretVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.services.secret_manager_service.pagers.ListSecretVersionsAsyncPager", + "shortName": "list_secret_versions" + }, + "description": "Sample for ListSecretVersions", + "file": "secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.list_secret_versions", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecretVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.ListSecretVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.services.secret_manager_service.pagers.ListSecretVersionsPager", + "shortName": "list_secret_versions" + }, + "description": "Sample for ListSecretVersions", + "file": "secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_list_secret_versions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.list_secrets", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecrets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.ListSecretsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.services.secret_manager_service.pagers.ListSecretsAsyncPager", + "shortName": "list_secrets" + }, + "description": "Sample for ListSecrets", + "file": "secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_list_secrets_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.list_secrets", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "ListSecrets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.ListSecretsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.services.secret_manager_service.pagers.ListSecretsPager", + "shortName": "list_secrets" + }, + "description": "Sample for ListSecrets", + "file": "secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_list_secrets_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.SetIamPolicy", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.set_iam_policy", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.SetIamPolicy", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.TestIamPermissions", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.TestIamPermissions", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient", + "shortName": "SecretManagerServiceAsyncClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceAsyncClient.update_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "UpdateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.UpdateSecretRequest" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1beta1.types.Secret" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "update_secret" + }, + "description": "Sample for UpdateSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_update_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient", + "shortName": "SecretManagerServiceClient" + }, + "fullName": "google.cloud.secretmanager_v1beta1.SecretManagerServiceClient.update_secret", + "method": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret", + "service": { + "fullName": "google.cloud.secrets.v1beta1.SecretManagerService", + "shortName": "SecretManagerService" + }, + "shortName": "UpdateSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.secretmanager_v1beta1.types.UpdateSecretRequest" + }, + { + "name": "secret", + "type": "google.cloud.secretmanager_v1beta1.types.Secret" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.secretmanager_v1beta1.types.Secret", + "shortName": "update_secret" + }, + "description": "Sample for UpdateSecret", + "file": "secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "secretmanager_v1beta1_generated_secret_manager_service_update_secret_sync.py" + } + ] +} diff --git a/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1/test_secret_manager_service.py b/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1/test_secret_manager_service.py index 7d200c766659..318895958734 100644 --- a/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1/test_secret_manager_service.py +++ b/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1/test_secret_manager_service.py @@ -1171,9 +1171,11 @@ async def test_list_secrets_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_secrets(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1202,7 +1204,6 @@ def test_create_secret(request_type, transport: str = "grpc"): call.return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) response = client.create_secret(request) @@ -1723,7 +1724,6 @@ def test_get_secret(request_type, transport: str = "grpc"): call.return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) response = client.get_secret(request) @@ -1956,7 +1956,6 @@ def test_update_secret(request_type, transport: str = "grpc"): call.return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) response = client.update_secret(request) @@ -2834,9 +2833,11 @@ async def test_list_secret_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_secret_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5020,7 +5021,6 @@ def test_create_secret_rest(request_type): return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) # Wrap the value into a proper Response obj @@ -5618,7 +5618,6 @@ def test_get_secret_rest(request_type): return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) # Wrap the value into a proper Response obj @@ -5903,7 +5902,6 @@ def test_update_secret_rest(request_type): return_value = resources.Secret( name="name_value", etag="etag_value", - expire_time=timestamp_pb2.Timestamp(seconds=751), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1beta1/test_secret_manager_service.py b/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1beta1/test_secret_manager_service.py index 69b7d8ec5512..6e57c172f192 100644 --- a/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1beta1/test_secret_manager_service.py +++ b/packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1beta1/test_secret_manager_service.py @@ -1170,9 +1170,11 @@ async def test_list_secrets_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_secrets(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2810,9 +2812,11 @@ async def test_list_secret_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_secret_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token