From abd5e359833466e555f13c5c0a5fb9fac1be08de Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sun, 27 Nov 2022 07:48:39 -0500 Subject: [PATCH] chore: Update gapic-generator-python to v1.6.1 (#35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud..__version__` PiperOrigin-RevId: 484665853 Source-Link: https://github.com/googleapis/googleapis/commit/8eb249a19db926c2fbc4ecf1dc09c0e521a88b22 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add .release-please-manifest.json with correct version * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: https://github.com/googleapis/googleapis/commit/da380c77bb87ba0f752baf07605dd1db30e1f7e1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: https://github.com/googleapis/googleapis/commit/5be5981f50322cf0c7388595e0f31ac5d0693469 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: https://github.com/googleapis/googleapis/commit/08f275f5c1c0d99056e1cb68376323414459ee19 Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use templated owlbot.py and setup.py * run nox format session Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../.github/release-please.yml | 1 + .../.release-please-manifest.json | 3 + packages/google-cloud-gke-backup/docs/conf.py | 2 +- .../docs/gke_backup_v1/types.rst | 1 - .../google/cloud/gke_backup/__init__.py | 115 + .../google/cloud/gke_backup/gapic_version.py | 16 + .../google/cloud/gke_backup/py.typed | 2 + .../google/cloud/gke_backup_v1/__init__.py | 81 +- .../services/backup_for_gke/__init__.py | 2 +- .../services/backup_for_gke/async_client.py | 251 +- .../services/backup_for_gke/client.py | 207 +- .../services/backup_for_gke/pagers.py | 18 +- .../backup_for_gke/transports/__init__.py | 4 +- .../backup_for_gke/transports/base.py | 25 +- .../backup_for_gke/transports/grpc.py | 46 +- .../backup_for_gke/transports/grpc_asyncio.py | 42 +- .../backup_for_gke/transports/rest.py | 103 +- .../cloud/gke_backup_v1/types/__init__.py | 29 +- .../cloud/gke_backup_v1/types/backup.py | 73 +- .../cloud/gke_backup_v1/types/backup_plan.py | 55 +- .../cloud/gke_backup_v1/types/common.py | 17 +- .../cloud/gke_backup_v1/types/gkebackup.py | 203 +- .../cloud/gke_backup_v1/types/restore.py | 85 +- .../cloud/gke_backup_v1/types/restore_plan.py | 27 +- .../cloud/gke_backup_v1/types/volume.py | 55 +- packages/google-cloud-gke-backup/noxfile.py | 1 + packages/google-cloud-gke-backup/owlbot.py | 24 +- .../release-please-config.json | 23 + ...or_gke_create_backup_plan_sync_ba40475b.py | 61 - ...or_gke_create_backup_plan_sync_f9f9cad1.py | 61 - ...kup_for_gke_create_backup_sync_a203f0cf.py | 56 - ...kup_for_gke_create_backup_sync_fc39e6b6.py | 56 - ...r_gke_create_restore_plan_sync_2a7b82f0.py | 63 - ...r_gke_create_restore_plan_sync_f481a3ea.py | 63 - ...up_for_gke_create_restore_sync_1b49290c.py | 61 - ...up_for_gke_create_restore_sync_232e398c.py | 61 - ...or_gke_delete_backup_plan_sync_22193aa7.py | 56 - ...or_gke_delete_backup_plan_sync_af958d29.py | 56 - ...kup_for_gke_delete_backup_sync_4e6838b6.py | 56 - ...kup_for_gke_delete_backup_sync_ba357f30.py | 56 - ...r_gke_delete_restore_plan_sync_0dd6c9ab.py | 56 - ...r_gke_delete_restore_plan_sync_be5aebc4.py | 56 - ...up_for_gke_delete_restore_sync_384f893e.py | 56 - ...up_for_gke_delete_restore_sync_5725835d.py | 56 - ...p_for_gke_get_backup_plan_sync_28db290d.py | 52 - ...p_for_gke_get_backup_plan_sync_afe8a7c5.py | 52 - ...backup_for_gke_get_backup_sync_07911578.py | 52 - ...backup_for_gke_get_backup_sync_e9cf234f.py | 52 - ..._for_gke_get_restore_plan_sync_16da5c9f.py | 52 - ..._for_gke_get_restore_plan_sync_c4c27d89.py | 52 - ...ackup_for_gke_get_restore_sync_5d9ab521.py | 52 - ...ackup_for_gke_get_restore_sync_9527929a.py | 52 - ...for_gke_get_volume_backup_sync_315e3ab4.py | 52 - ...for_gke_get_volume_backup_sync_c8db7aee.py | 52 - ...or_gke_get_volume_restore_sync_746cfb01.py | 52 - ...or_gke_get_volume_restore_sync_8da989ef.py | 52 - ...for_gke_list_backup_plans_sync_5ec6dd54.py | 53 - ...for_gke_list_backup_plans_sync_60016b65.py | 53 - ...ckup_for_gke_list_backups_sync_7da6881e.py | 53 - ...ckup_for_gke_list_backups_sync_a7e57cb2.py | 53 - ...or_gke_list_restore_plans_sync_9e86e9ed.py | 53 - ...or_gke_list_restore_plans_sync_ac5c3de5.py | 53 - ...kup_for_gke_list_restores_sync_003c4a18.py | 53 - ...kup_for_gke_list_restores_sync_c52e2c76.py | 53 - ...r_gke_list_volume_backups_sync_66d26f94.py | 53 - ...r_gke_list_volume_backups_sync_b686a40a.py | 53 - ..._gke_list_volume_restores_sync_96c127d6.py | 53 - ..._gke_list_volume_restores_sync_e6df2c15.py | 53 - ...or_gke_update_backup_plan_sync_240d1e05.py | 59 - ...or_gke_update_backup_plan_sync_e9cd4e74.py | 59 - ...kup_for_gke_update_backup_sync_701ec3bb.py | 59 - ...kup_for_gke_update_backup_sync_c44e40c5.py | 59 - ...r_gke_update_restore_plan_sync_a36705f8.py | 61 - ...r_gke_update_restore_plan_sync_b115a29d.py | 61 - ...up_for_gke_update_restore_sync_01ce4e95.py | 59 - ...up_for_gke_update_restore_sync_f27381f8.py | 59 - ...t_metadata_google.cloud.gkebackup.v1.json} | 3093 +++-------------- packages/google-cloud-gke-backup/setup.py | 29 +- .../testing/constraints-3.10.txt | 6 + .../testing/constraints-3.11.txt | 6 + .../testing/constraints-3.8.txt | 6 + .../testing/constraints-3.9.txt | 6 + .../gke_backup_v1/test_backup_for_gke.py | 59 +- 83 files changed, 1491 insertions(+), 5891 deletions(-) create mode 100644 packages/google-cloud-gke-backup/.release-please-manifest.json create mode 100644 packages/google-cloud-gke-backup/google/cloud/gke_backup/__init__.py create mode 100644 packages/google-cloud-gke-backup/google/cloud/gke_backup/gapic_version.py create mode 100644 packages/google-cloud-gke-backup/google/cloud/gke_backup/py.typed create mode 100644 packages/google-cloud-gke-backup/release-please-config.json delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py delete mode 100644 packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py rename packages/google-cloud-gke-backup/samples/generated_samples/{snippet_metadata_gke backup_v1.json => snippet_metadata_google.cloud.gkebackup.v1.json} (66%) diff --git a/packages/google-cloud-gke-backup/.github/release-please.yml b/packages/google-cloud-gke-backup/.github/release-please.yml index 466597e5b196..528b2741a1f7 100644 --- a/packages/google-cloud-gke-backup/.github/release-please.yml +++ b/packages/google-cloud-gke-backup/.github/release-please.yml @@ -1,2 +1,3 @@ releaseType: python handleGHRelease: true +manifest: true diff --git a/packages/google-cloud-gke-backup/.release-please-manifest.json b/packages/google-cloud-gke-backup/.release-please-manifest.json new file mode 100644 index 000000000000..949ce4c188fa --- /dev/null +++ b/packages/google-cloud-gke-backup/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.2.2" +} diff --git a/packages/google-cloud-gke-backup/docs/conf.py b/packages/google-cloud-gke-backup/docs/conf.py index d82e84ea782b..6b52bb122937 100644 --- a/packages/google-cloud-gke-backup/docs/conf.py +++ b/packages/google-cloud-gke-backup/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/packages/google-cloud-gke-backup/docs/gke_backup_v1/types.rst b/packages/google-cloud-gke-backup/docs/gke_backup_v1/types.rst index 15b38073fcb2..4caa4138f348 100644 --- a/packages/google-cloud-gke-backup/docs/gke_backup_v1/types.rst +++ b/packages/google-cloud-gke-backup/docs/gke_backup_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Gke Backup v1 API .. automodule:: google.cloud.gke_backup_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup/__init__.py new file mode 100644 index 000000000000..667999f9ead5 --- /dev/null +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.cloud.gke_backup import gapic_version as package_version + +__version__ = package_version.__version__ + + +from google.cloud.gke_backup_v1.services.backup_for_gke.async_client import ( + BackupForGKEAsyncClient, +) +from google.cloud.gke_backup_v1.services.backup_for_gke.client import BackupForGKEClient +from google.cloud.gke_backup_v1.types.backup import Backup +from google.cloud.gke_backup_v1.types.backup_plan import BackupPlan +from google.cloud.gke_backup_v1.types.common import ( + EncryptionKey, + NamespacedName, + NamespacedNames, + Namespaces, +) +from google.cloud.gke_backup_v1.types.gkebackup import ( + CreateBackupPlanRequest, + CreateBackupRequest, + CreateRestorePlanRequest, + CreateRestoreRequest, + DeleteBackupPlanRequest, + DeleteBackupRequest, + DeleteRestorePlanRequest, + DeleteRestoreRequest, + GetBackupPlanRequest, + GetBackupRequest, + GetRestorePlanRequest, + GetRestoreRequest, + GetVolumeBackupRequest, + GetVolumeRestoreRequest, + ListBackupPlansRequest, + ListBackupPlansResponse, + ListBackupsRequest, + ListBackupsResponse, + ListRestorePlansRequest, + ListRestorePlansResponse, + ListRestoresRequest, + ListRestoresResponse, + ListVolumeBackupsRequest, + ListVolumeBackupsResponse, + ListVolumeRestoresRequest, + ListVolumeRestoresResponse, + OperationMetadata, + UpdateBackupPlanRequest, + UpdateBackupRequest, + UpdateRestorePlanRequest, + UpdateRestoreRequest, +) +from google.cloud.gke_backup_v1.types.restore import Restore, RestoreConfig +from google.cloud.gke_backup_v1.types.restore_plan import RestorePlan +from google.cloud.gke_backup_v1.types.volume import VolumeBackup, VolumeRestore + +__all__ = ( + "BackupForGKEClient", + "BackupForGKEAsyncClient", + "Backup", + "BackupPlan", + "EncryptionKey", + "NamespacedName", + "NamespacedNames", + "Namespaces", + "CreateBackupPlanRequest", + "CreateBackupRequest", + "CreateRestorePlanRequest", + "CreateRestoreRequest", + "DeleteBackupPlanRequest", + "DeleteBackupRequest", + "DeleteRestorePlanRequest", + "DeleteRestoreRequest", + "GetBackupPlanRequest", + "GetBackupRequest", + "GetRestorePlanRequest", + "GetRestoreRequest", + "GetVolumeBackupRequest", + "GetVolumeRestoreRequest", + "ListBackupPlansRequest", + "ListBackupPlansResponse", + "ListBackupsRequest", + "ListBackupsResponse", + "ListRestorePlansRequest", + "ListRestorePlansResponse", + "ListRestoresRequest", + "ListRestoresResponse", + "ListVolumeBackupsRequest", + "ListVolumeBackupsResponse", + "ListVolumeRestoresRequest", + "ListVolumeRestoresResponse", + "OperationMetadata", + "UpdateBackupPlanRequest", + "UpdateBackupRequest", + "UpdateRestorePlanRequest", + "UpdateRestoreRequest", + "Restore", + "RestoreConfig", + "RestorePlan", + "VolumeBackup", + "VolumeRestore", +) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup/gapic_version.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup/gapic_version.py new file mode 100644 index 000000000000..76c40f2af477 --- /dev/null +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.2.2" # {x-release-please-version} diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup/py.typed b/packages/google-cloud-gke-backup/google/cloud/gke_backup/py.typed new file mode 100644 index 000000000000..804475f1e27d --- /dev/null +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-cloud-gke-backup package uses inline types. diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py index ee4434c849e4..98835102d514 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py @@ -13,52 +13,51 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.gke_backup import gapic_version as package_version -from .services.backup_for_gke import BackupForGKEClient -from .services.backup_for_gke import BackupForGKEAsyncClient +__version__ = package_version.__version__ + +from .services.backup_for_gke import BackupForGKEAsyncClient, BackupForGKEClient from .types.backup import Backup from .types.backup_plan import BackupPlan -from .types.common import EncryptionKey -from .types.common import NamespacedName -from .types.common import NamespacedNames -from .types.common import Namespaces -from .types.gkebackup import CreateBackupPlanRequest -from .types.gkebackup import CreateBackupRequest -from .types.gkebackup import CreateRestorePlanRequest -from .types.gkebackup import CreateRestoreRequest -from .types.gkebackup import DeleteBackupPlanRequest -from .types.gkebackup import DeleteBackupRequest -from .types.gkebackup import DeleteRestorePlanRequest -from .types.gkebackup import DeleteRestoreRequest -from .types.gkebackup import GetBackupPlanRequest -from .types.gkebackup import GetBackupRequest -from .types.gkebackup import GetRestorePlanRequest -from .types.gkebackup import GetRestoreRequest -from .types.gkebackup import GetVolumeBackupRequest -from .types.gkebackup import GetVolumeRestoreRequest -from .types.gkebackup import ListBackupPlansRequest -from .types.gkebackup import ListBackupPlansResponse -from .types.gkebackup import ListBackupsRequest -from .types.gkebackup import ListBackupsResponse -from .types.gkebackup import ListRestorePlansRequest -from .types.gkebackup import ListRestorePlansResponse -from .types.gkebackup import ListRestoresRequest -from .types.gkebackup import ListRestoresResponse -from .types.gkebackup import ListVolumeBackupsRequest -from .types.gkebackup import ListVolumeBackupsResponse -from .types.gkebackup import ListVolumeRestoresRequest -from .types.gkebackup import ListVolumeRestoresResponse -from .types.gkebackup import OperationMetadata -from .types.gkebackup import UpdateBackupPlanRequest -from .types.gkebackup import UpdateBackupRequest -from .types.gkebackup import UpdateRestorePlanRequest -from .types.gkebackup import UpdateRestoreRequest -from .types.restore import Restore -from .types.restore import RestoreConfig +from .types.common import EncryptionKey, NamespacedName, NamespacedNames, Namespaces +from .types.gkebackup import ( + CreateBackupPlanRequest, + CreateBackupRequest, + CreateRestorePlanRequest, + CreateRestoreRequest, + DeleteBackupPlanRequest, + DeleteBackupRequest, + DeleteRestorePlanRequest, + DeleteRestoreRequest, + GetBackupPlanRequest, + GetBackupRequest, + GetRestorePlanRequest, + GetRestoreRequest, + GetVolumeBackupRequest, + GetVolumeRestoreRequest, + ListBackupPlansRequest, + ListBackupPlansResponse, + ListBackupsRequest, + ListBackupsResponse, + ListRestorePlansRequest, + ListRestorePlansResponse, + ListRestoresRequest, + ListRestoresResponse, + ListVolumeBackupsRequest, + ListVolumeBackupsResponse, + ListVolumeRestoresRequest, + ListVolumeRestoresResponse, + OperationMetadata, + UpdateBackupPlanRequest, + UpdateBackupRequest, + UpdateRestorePlanRequest, + UpdateRestoreRequest, +) +from .types.restore import Restore, RestoreConfig from .types.restore_plan import RestorePlan -from .types.volume import VolumeBackup -from .types.volume import VolumeRestore +from .types.volume import VolumeBackup, VolumeRestore __all__ = ( "BackupForGKEAsyncClient", diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/__init__.py index 120555537ece..74fea4155b1d 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/__init__.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import BackupForGKEClient from .async_client import BackupForGKEAsyncClient +from .client import BackupForGKEClient __all__ = ( "BackupForGKEClient", diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py index 4d00e63447ff..ac61465c18d4 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py @@ -16,15 +16,25 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -33,24 +43,25 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore +from google.protobuf import empty_pb2 # type: ignore +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.gke_backup_v1.services.backup_for_gke import pagers from google.cloud.gke_backup_v1.types import backup from google.cloud.gke_backup_v1.types import backup as gcg_backup from google.cloud.gke_backup_v1.types import backup_plan from google.cloud.gke_backup_v1.types import backup_plan as gcg_backup_plan -from google.cloud.gke_backup_v1.types import common -from google.cloud.gke_backup_v1.types import gkebackup +from google.cloud.gke_backup_v1.types import common, gkebackup from google.cloud.gke_backup_v1.types import restore from google.cloud.gke_backup_v1.types import restore as gcg_restore from google.cloud.gke_backup_v1.types import restore_plan from google.cloud.gke_backup_v1.types import restore_plan as gcg_restore_plan from google.cloud.gke_backup_v1.types import volume -from google.protobuf import empty_pb2 # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import BackupForGKETransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import BackupForGKEGrpcAsyncIOTransport + from .client import BackupForGKEClient +from .transports.base import DEFAULT_CLIENT_INFO, BackupForGKETransport +from .transports.grpc_asyncio import BackupForGKEGrpcAsyncIOTransport class BackupForGKEAsyncClient: @@ -188,9 +199,9 @@ def transport(self) -> BackupForGKETransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, BackupForGKETransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the backup for gke client. @@ -234,13 +245,13 @@ def __init__( async def create_backup_plan( self, - request: Union[gkebackup.CreateBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.CreateBackupPlanRequest, dict]] = None, *, - parent: str = None, - backup_plan: gcg_backup_plan.BackupPlan = None, - backup_plan_id: str = None, + parent: Optional[str] = None, + backup_plan: Optional[gcg_backup_plan.BackupPlan] = None, + backup_plan_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new BackupPlan in a given location. @@ -281,7 +292,7 @@ async def sample_create_backup_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.CreateBackupPlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.CreateBackupPlanRequest, dict]]): The request object. Request message for CreateBackupPlan. parent (:class:`str`): @@ -385,11 +396,11 @@ async def sample_create_backup_plan(): async def list_backup_plans( self, - request: Union[gkebackup.ListBackupPlansRequest, dict] = None, + request: Optional[Union[gkebackup.ListBackupPlansRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBackupPlansAsyncPager: r"""Lists BackupPlans in a given location. @@ -422,7 +433,7 @@ async def sample_list_backup_plans(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListBackupPlansRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListBackupPlansRequest, dict]]): The request object. Request message for ListBackupPlans. parent (:class:`str`): Required. The location that contains the BackupPlans to @@ -507,11 +518,11 @@ async def sample_list_backup_plans(): async def get_backup_plan( self, - request: Union[gkebackup.GetBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.GetBackupPlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup_plan.BackupPlan: r"""Retrieve the details of a single BackupPlan. @@ -543,7 +554,7 @@ async def sample_get_backup_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetBackupPlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetBackupPlanRequest, dict]]): The request object. Request message for GetBackupPlan. name (:class:`str`): Required. Fully qualified BackupPlan name. Format: @@ -617,12 +628,12 @@ async def sample_get_backup_plan(): async def update_backup_plan( self, - request: Union[gkebackup.UpdateBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateBackupPlanRequest, dict]] = None, *, - backup_plan: gcg_backup_plan.BackupPlan = None, - update_mask: field_mask_pb2.FieldMask = None, + backup_plan: Optional[gcg_backup_plan.BackupPlan] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update a BackupPlan. @@ -661,7 +672,7 @@ async def sample_update_backup_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest, dict]]): The request object. Request message for UpdateBackupPlan. backup_plan (:class:`google.cloud.gke_backup_v1.types.BackupPlan`): @@ -760,11 +771,11 @@ async def sample_update_backup_plan(): async def delete_backup_plan( self, - request: Union[gkebackup.DeleteBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteBackupPlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes an existing BackupPlan. @@ -800,7 +811,7 @@ async def sample_delete_backup_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest, dict]]): The request object. Request message for DeleteBackupPlan. name (:class:`str`): @@ -884,13 +895,13 @@ async def sample_delete_backup_plan(): async def create_backup( self, - request: Union[gkebackup.CreateBackupRequest, dict] = None, + request: Optional[Union[gkebackup.CreateBackupRequest, dict]] = None, *, - parent: str = None, - backup: gcg_backup.Backup = None, - backup_id: str = None, + parent: Optional[str] = None, + backup: Optional[gcg_backup.Backup] = None, + backup_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a Backup for the given BackupPlan. @@ -926,7 +937,7 @@ async def sample_create_backup(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.CreateBackupRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.CreateBackupRequest, dict]]): The request object. Request message for CreateBackup. parent (:class:`str`): Required. The BackupPlan within which to create the @@ -1026,11 +1037,11 @@ async def sample_create_backup(): async def list_backups( self, - request: Union[gkebackup.ListBackupsRequest, dict] = None, + request: Optional[Union[gkebackup.ListBackupsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBackupsAsyncPager: r"""Lists the Backups for a given BackupPlan. @@ -1063,7 +1074,7 @@ async def sample_list_backups(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListBackupsRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListBackupsRequest, dict]]): The request object. Request message for ListBackups. parent (:class:`str`): Required. The BackupPlan that contains the Backups to @@ -1148,11 +1159,11 @@ async def sample_list_backups(): async def get_backup( self, - request: Union[gkebackup.GetBackupRequest, dict] = None, + request: Optional[Union[gkebackup.GetBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup.Backup: r"""Retrieve the details of a single Backup. @@ -1184,7 +1195,7 @@ async def sample_get_backup(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetBackupRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetBackupRequest, dict]]): The request object. Request message for GetBackup. name (:class:`str`): Required. Full name of the Backup resource. Format: @@ -1264,12 +1275,12 @@ async def sample_get_backup(): async def update_backup( self, - request: Union[gkebackup.UpdateBackupRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateBackupRequest, dict]] = None, *, - backup: gcg_backup.Backup = None, - update_mask: field_mask_pb2.FieldMask = None, + backup: Optional[gcg_backup.Backup] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update a Backup. @@ -1308,7 +1319,7 @@ async def sample_update_backup(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.UpdateBackupRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.UpdateBackupRequest, dict]]): The request object. Request message for UpdateBackup. backup (:class:`google.cloud.gke_backup_v1.types.Backup`): Required. A new version of the Backup resource that @@ -1405,11 +1416,11 @@ async def sample_update_backup(): async def delete_backup( self, - request: Union[gkebackup.DeleteBackupRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes an existing Backup. @@ -1445,7 +1456,7 @@ async def sample_delete_backup(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.DeleteBackupRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.DeleteBackupRequest, dict]]): The request object. Request message for DeleteBackup. name (:class:`str`): Required. Name of the Backup resource. Format: @@ -1528,11 +1539,11 @@ async def sample_delete_backup(): async def list_volume_backups( self, - request: Union[gkebackup.ListVolumeBackupsRequest, dict] = None, + request: Optional[Union[gkebackup.ListVolumeBackupsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVolumeBackupsAsyncPager: r"""Lists the VolumeBackups for a given Backup. @@ -1565,7 +1576,7 @@ async def sample_list_volume_backups(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest, dict]]): The request object. Request message for ListVolumeBackups. parent (:class:`str`): @@ -1653,11 +1664,11 @@ async def sample_list_volume_backups(): async def get_volume_backup( self, - request: Union[gkebackup.GetVolumeBackupRequest, dict] = None, + request: Optional[Union[gkebackup.GetVolumeBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeBackup: r"""Retrieve the details of a single VolumeBackup. @@ -1689,7 +1700,7 @@ async def sample_get_volume_backup(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetVolumeBackupRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetVolumeBackupRequest, dict]]): The request object. Request message for GetVolumeBackup. name (:class:`str`): Required. Full name of the VolumeBackup resource. @@ -1768,13 +1779,13 @@ async def sample_get_volume_backup(): async def create_restore_plan( self, - request: Union[gkebackup.CreateRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.CreateRestorePlanRequest, dict]] = None, *, - parent: str = None, - restore_plan: gcg_restore_plan.RestorePlan = None, - restore_plan_id: str = None, + parent: Optional[str] = None, + restore_plan: Optional[gcg_restore_plan.RestorePlan] = None, + restore_plan_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new RestorePlan in a given location. @@ -1817,7 +1828,7 @@ async def sample_create_restore_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.CreateRestorePlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.CreateRestorePlanRequest, dict]]): The request object. Request message for CreateRestorePlan. parent (:class:`str`): @@ -1919,11 +1930,11 @@ async def sample_create_restore_plan(): async def list_restore_plans( self, - request: Union[gkebackup.ListRestorePlansRequest, dict] = None, + request: Optional[Union[gkebackup.ListRestorePlansRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListRestorePlansAsyncPager: r"""Lists RestorePlans in a given location. @@ -1956,7 +1967,7 @@ async def sample_list_restore_plans(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListRestorePlansRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListRestorePlansRequest, dict]]): The request object. Request message for ListRestorePlans. parent (:class:`str`): @@ -2043,11 +2054,11 @@ async def sample_list_restore_plans(): async def get_restore_plan( self, - request: Union[gkebackup.GetRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.GetRestorePlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore_plan.RestorePlan: r"""Retrieve the details of a single RestorePlan. @@ -2079,7 +2090,7 @@ async def sample_get_restore_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetRestorePlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetRestorePlanRequest, dict]]): The request object. Request message for GetRestorePlan. name (:class:`str`): Required. Fully qualified RestorePlan name. Format: @@ -2155,12 +2166,12 @@ async def sample_get_restore_plan(): async def update_restore_plan( self, - request: Union[gkebackup.UpdateRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateRestorePlanRequest, dict]] = None, *, - restore_plan: gcg_restore_plan.RestorePlan = None, - update_mask: field_mask_pb2.FieldMask = None, + restore_plan: Optional[gcg_restore_plan.RestorePlan] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update a RestorePlan. @@ -2201,7 +2212,7 @@ async def sample_update_restore_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.UpdateRestorePlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.UpdateRestorePlanRequest, dict]]): The request object. Request message for UpdateRestorePlan. restore_plan (:class:`google.cloud.gke_backup_v1.types.RestorePlan`): @@ -2298,11 +2309,11 @@ async def sample_update_restore_plan(): async def delete_restore_plan( self, - request: Union[gkebackup.DeleteRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteRestorePlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes an existing RestorePlan. @@ -2338,7 +2349,7 @@ async def sample_delete_restore_plan(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest, dict]]): The request object. Request message for DeleteRestorePlan. name (:class:`str`): @@ -2422,13 +2433,13 @@ async def sample_delete_restore_plan(): async def create_restore( self, - request: Union[gkebackup.CreateRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.CreateRestoreRequest, dict]] = None, *, - parent: str = None, - restore: gcg_restore.Restore = None, - restore_id: str = None, + parent: Optional[str] = None, + restore: Optional[gcg_restore.Restore] = None, + restore_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Restore for the given RestorePlan. @@ -2469,7 +2480,7 @@ async def sample_create_restore(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.CreateRestoreRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.CreateRestoreRequest, dict]]): The request object. Request message for CreateRestore. parent (:class:`str`): Required. The RestorePlan within which to create the @@ -2571,11 +2582,11 @@ async def sample_create_restore(): async def list_restores( self, - request: Union[gkebackup.ListRestoresRequest, dict] = None, + request: Optional[Union[gkebackup.ListRestoresRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListRestoresAsyncPager: r"""Lists the Restores for a given RestorePlan. @@ -2608,7 +2619,7 @@ async def sample_list_restores(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListRestoresRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListRestoresRequest, dict]]): The request object. Request message for ListRestores. parent (:class:`str`): Required. The RestorePlan that contains the Restores to @@ -2693,11 +2704,11 @@ async def sample_list_restores(): async def get_restore( self, - request: Union[gkebackup.GetRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.GetRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore.Restore: r"""Retrieves the details of a single Restore. @@ -2729,7 +2740,7 @@ async def sample_get_restore(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetRestoreRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetRestoreRequest, dict]]): The request object. Request message for GetRestore. name (:class:`str`): Required. Name of the restore resource. Format: @@ -2805,12 +2816,12 @@ async def sample_get_restore(): async def update_restore( self, - request: Union[gkebackup.UpdateRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateRestoreRequest, dict]] = None, *, - restore: gcg_restore.Restore = None, - update_mask: field_mask_pb2.FieldMask = None, + restore: Optional[gcg_restore.Restore] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update a Restore. @@ -2849,7 +2860,7 @@ async def sample_update_restore(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.UpdateRestoreRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.UpdateRestoreRequest, dict]]): The request object. Request message for UpdateRestore. restore (:class:`google.cloud.gke_backup_v1.types.Restore`): Required. A new version of the Restore resource that @@ -2944,11 +2955,11 @@ async def sample_update_restore(): async def delete_restore( self, - request: Union[gkebackup.DeleteRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes an existing Restore. @@ -2984,7 +2995,7 @@ async def sample_delete_restore(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.DeleteRestoreRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.DeleteRestoreRequest, dict]]): The request object. Request message for DeleteRestore. name (:class:`str`): Required. Full name of the Restore Format: @@ -3067,11 +3078,11 @@ async def sample_delete_restore(): async def list_volume_restores( self, - request: Union[gkebackup.ListVolumeRestoresRequest, dict] = None, + request: Optional[Union[gkebackup.ListVolumeRestoresRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVolumeRestoresAsyncPager: r"""Lists the VolumeRestores for a given Restore. @@ -3104,7 +3115,7 @@ async def sample_list_volume_restores(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest, dict]]): The request object. Request message for ListVolumeRestores. parent (:class:`str`): @@ -3192,11 +3203,11 @@ async def sample_list_volume_restores(): async def get_volume_restore( self, - request: Union[gkebackup.GetVolumeRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.GetVolumeRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeRestore: r"""Retrieve the details of a single VolumeRestore. @@ -3228,7 +3239,7 @@ async def sample_get_volume_restore(): print(response) Args: - request (Union[google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest, dict]): + request (Optional[Union[google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest, dict]]): The request object. Request message for GetVolumeRestore. name (:class:`str`): diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/client.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/client.py index f5b3546f78e1..efaab24ceac8 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/client.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,22 +47,23 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore +from google.protobuf import empty_pb2 # type: ignore +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.gke_backup_v1.services.backup_for_gke import pagers from google.cloud.gke_backup_v1.types import backup from google.cloud.gke_backup_v1.types import backup as gcg_backup from google.cloud.gke_backup_v1.types import backup_plan from google.cloud.gke_backup_v1.types import backup_plan as gcg_backup_plan -from google.cloud.gke_backup_v1.types import common -from google.cloud.gke_backup_v1.types import gkebackup +from google.cloud.gke_backup_v1.types import common, gkebackup from google.cloud.gke_backup_v1.types import restore from google.cloud.gke_backup_v1.types import restore as gcg_restore from google.cloud.gke_backup_v1.types import restore_plan from google.cloud.gke_backup_v1.types import restore_plan as gcg_restore_plan from google.cloud.gke_backup_v1.types import volume -from google.protobuf import empty_pb2 # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import BackupForGKETransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, BackupForGKETransport from .transports.grpc import BackupForGKEGrpcTransport from .transports.grpc_asyncio import BackupForGKEGrpcAsyncIOTransport from .transports.rest import BackupForGKERestTransport @@ -72,7 +84,7 @@ class BackupForGKEClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[BackupForGKETransport]: """Returns an appropriate transport class. @@ -520,8 +532,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, BackupForGKETransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, BackupForGKETransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the backup for gke client. @@ -538,7 +550,7 @@ def __init__( NOTE: "rest" transport functionality is currently in a beta state (preview). We welcome your feedback via an issue in this library's source repository. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -568,6 +580,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -620,13 +633,13 @@ def __init__( def create_backup_plan( self, - request: Union[gkebackup.CreateBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.CreateBackupPlanRequest, dict]] = None, *, - parent: str = None, - backup_plan: gcg_backup_plan.BackupPlan = None, - backup_plan_id: str = None, + parent: Optional[str] = None, + backup_plan: Optional[gcg_backup_plan.BackupPlan] = None, + backup_plan_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new BackupPlan in a given location. @@ -771,11 +784,11 @@ def sample_create_backup_plan(): def list_backup_plans( self, - request: Union[gkebackup.ListBackupPlansRequest, dict] = None, + request: Optional[Union[gkebackup.ListBackupPlansRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBackupPlansPager: r"""Lists BackupPlans in a given location. @@ -884,11 +897,11 @@ def sample_list_backup_plans(): def get_backup_plan( self, - request: Union[gkebackup.GetBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.GetBackupPlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup_plan.BackupPlan: r"""Retrieve the details of a single BackupPlan. @@ -985,12 +998,12 @@ def sample_get_backup_plan(): def update_backup_plan( self, - request: Union[gkebackup.UpdateBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateBackupPlanRequest, dict]] = None, *, - backup_plan: gcg_backup_plan.BackupPlan = None, - update_mask: field_mask_pb2.FieldMask = None, + backup_plan: Optional[gcg_backup_plan.BackupPlan] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update a BackupPlan. @@ -1128,11 +1141,11 @@ def sample_update_backup_plan(): def delete_backup_plan( self, - request: Union[gkebackup.DeleteBackupPlanRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteBackupPlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes an existing BackupPlan. @@ -1252,13 +1265,13 @@ def sample_delete_backup_plan(): def create_backup( self, - request: Union[gkebackup.CreateBackupRequest, dict] = None, + request: Optional[Union[gkebackup.CreateBackupRequest, dict]] = None, *, - parent: str = None, - backup: gcg_backup.Backup = None, - backup_id: str = None, + parent: Optional[str] = None, + backup: Optional[gcg_backup.Backup] = None, + backup_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a Backup for the given BackupPlan. @@ -1394,11 +1407,11 @@ def sample_create_backup(): def list_backups( self, - request: Union[gkebackup.ListBackupsRequest, dict] = None, + request: Optional[Union[gkebackup.ListBackupsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBackupsPager: r"""Lists the Backups for a given BackupPlan. @@ -1507,11 +1520,11 @@ def sample_list_backups(): def get_backup( self, - request: Union[gkebackup.GetBackupRequest, dict] = None, + request: Optional[Union[gkebackup.GetBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup.Backup: r"""Retrieve the details of a single Backup. @@ -1614,12 +1627,12 @@ def sample_get_backup(): def update_backup( self, - request: Union[gkebackup.UpdateBackupRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateBackupRequest, dict]] = None, *, - backup: gcg_backup.Backup = None, - update_mask: field_mask_pb2.FieldMask = None, + backup: Optional[gcg_backup.Backup] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update a Backup. @@ -1755,11 +1768,11 @@ def sample_update_backup(): def delete_backup( self, - request: Union[gkebackup.DeleteBackupRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes an existing Backup. @@ -1878,11 +1891,11 @@ def sample_delete_backup(): def list_volume_backups( self, - request: Union[gkebackup.ListVolumeBackupsRequest, dict] = None, + request: Optional[Union[gkebackup.ListVolumeBackupsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVolumeBackupsPager: r"""Lists the VolumeBackups for a given Backup. @@ -1994,11 +2007,11 @@ def sample_list_volume_backups(): def get_volume_backup( self, - request: Union[gkebackup.GetVolumeBackupRequest, dict] = None, + request: Optional[Union[gkebackup.GetVolumeBackupRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeBackup: r"""Retrieve the details of a single VolumeBackup. @@ -2100,13 +2113,13 @@ def sample_get_volume_backup(): def create_restore_plan( self, - request: Union[gkebackup.CreateRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.CreateRestorePlanRequest, dict]] = None, *, - parent: str = None, - restore_plan: gcg_restore_plan.RestorePlan = None, - restore_plan_id: str = None, + parent: Optional[str] = None, + restore_plan: Optional[gcg_restore_plan.RestorePlan] = None, + restore_plan_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new RestorePlan in a given location. @@ -2251,11 +2264,11 @@ def sample_create_restore_plan(): def list_restore_plans( self, - request: Union[gkebackup.ListRestorePlansRequest, dict] = None, + request: Optional[Union[gkebackup.ListRestorePlansRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListRestorePlansPager: r"""Lists RestorePlans in a given location. @@ -2366,11 +2379,11 @@ def sample_list_restore_plans(): def get_restore_plan( self, - request: Union[gkebackup.GetRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.GetRestorePlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore_plan.RestorePlan: r"""Retrieve the details of a single RestorePlan. @@ -2469,12 +2482,12 @@ def sample_get_restore_plan(): def update_restore_plan( self, - request: Union[gkebackup.UpdateRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateRestorePlanRequest, dict]] = None, *, - restore_plan: gcg_restore_plan.RestorePlan = None, - update_mask: field_mask_pb2.FieldMask = None, + restore_plan: Optional[gcg_restore_plan.RestorePlan] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update a RestorePlan. @@ -2612,11 +2625,11 @@ def sample_update_restore_plan(): def delete_restore_plan( self, - request: Union[gkebackup.DeleteRestorePlanRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteRestorePlanRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes an existing RestorePlan. @@ -2736,13 +2749,13 @@ def sample_delete_restore_plan(): def create_restore( self, - request: Union[gkebackup.CreateRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.CreateRestoreRequest, dict]] = None, *, - parent: str = None, - restore: gcg_restore.Restore = None, - restore_id: str = None, + parent: Optional[str] = None, + restore: Optional[gcg_restore.Restore] = None, + restore_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Restore for the given RestorePlan. @@ -2885,11 +2898,11 @@ def sample_create_restore(): def list_restores( self, - request: Union[gkebackup.ListRestoresRequest, dict] = None, + request: Optional[Union[gkebackup.ListRestoresRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListRestoresPager: r"""Lists the Restores for a given RestorePlan. @@ -2998,11 +3011,11 @@ def sample_list_restores(): def get_restore( self, - request: Union[gkebackup.GetRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.GetRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore.Restore: r"""Retrieves the details of a single Restore. @@ -3101,12 +3114,12 @@ def sample_get_restore(): def update_restore( self, - request: Union[gkebackup.UpdateRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.UpdateRestoreRequest, dict]] = None, *, - restore: gcg_restore.Restore = None, - update_mask: field_mask_pb2.FieldMask = None, + restore: Optional[gcg_restore.Restore] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update a Restore. @@ -3240,11 +3253,11 @@ def sample_update_restore(): def delete_restore( self, - request: Union[gkebackup.DeleteRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.DeleteRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes an existing Restore. @@ -3363,11 +3376,11 @@ def sample_delete_restore(): def list_volume_restores( self, - request: Union[gkebackup.ListVolumeRestoresRequest, dict] = None, + request: Optional[Union[gkebackup.ListVolumeRestoresRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVolumeRestoresPager: r"""Lists the VolumeRestores for a given Restore. @@ -3479,11 +3492,11 @@ def sample_list_volume_restores(): def get_volume_restore( self, - request: Union[gkebackup.GetVolumeRestoreRequest, dict] = None, + request: Optional[Union[gkebackup.GetVolumeRestoreRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeRestore: r"""Retrieve the details of a single VolumeRestore. diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/pagers.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/pagers.py index 7804cb1e981b..bdfcdfc83185 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/pagers.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/pagers.py @@ -18,18 +18,20 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) -from google.cloud.gke_backup_v1.types import backup -from google.cloud.gke_backup_v1.types import backup_plan -from google.cloud.gke_backup_v1.types import gkebackup -from google.cloud.gke_backup_v1.types import restore -from google.cloud.gke_backup_v1.types import restore_plan -from google.cloud.gke_backup_v1.types import volume +from google.cloud.gke_backup_v1.types import ( + backup, + backup_plan, + gkebackup, + restore, + restore_plan, + volume, +) class ListBackupPlansPager: diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/__init__.py index ca63154b208e..65f839228a71 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/__init__.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/__init__.py @@ -19,9 +19,7 @@ from .base import BackupForGKETransport from .grpc import BackupForGKEGrpcTransport from .grpc_asyncio import BackupForGKEGrpcAsyncIOTransport -from .rest import BackupForGKERestTransport -from .rest import BackupForGKERestInterceptor - +from .rest import BackupForGKERestInterceptor, BackupForGKERestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[BackupForGKETransport]] diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/base.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/base.py index 240cdc4a5961..9e6f9644bd11 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/base.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/base.py @@ -15,24 +15,25 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, operations_v1 from google.api_core import retry as retries -from google.api_core import operations_v1 +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources -from google.cloud.gke_backup_v1.types import backup -from google.cloud.gke_backup_v1.types import backup_plan -from google.cloud.gke_backup_v1.types import gkebackup -from google.cloud.gke_backup_v1.types import restore -from google.cloud.gke_backup_v1.types import restore_plan -from google.cloud.gke_backup_v1.types import volume -from google.longrunning import operations_pb2 # type: ignore +from google.cloud.gke_backup_v1.types import ( + backup, + backup_plan, + gkebackup, + restore, + restore_plan, + volume, +) try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -55,7 +56,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc.py index 2a2207eb2ceb..224a52a5d276 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc.py @@ -13,26 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import operations_v1 -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers, operations_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore import grpc # type: ignore -from google.cloud.gke_backup_v1.types import backup -from google.cloud.gke_backup_v1.types import backup_plan -from google.cloud.gke_backup_v1.types import gkebackup -from google.cloud.gke_backup_v1.types import restore -from google.cloud.gke_backup_v1.types import restore_plan -from google.cloud.gke_backup_v1.types import volume -from google.longrunning import operations_pb2 # type: ignore -from .base import BackupForGKETransport, DEFAULT_CLIENT_INFO +from google.cloud.gke_backup_v1.types import ( + backup, + backup_plan, + gkebackup, + restore, + restore_plan, + volume, +) + +from .base import DEFAULT_CLIENT_INFO, BackupForGKETransport class BackupForGKEGrpcTransport(BackupForGKETransport): @@ -56,14 +56,14 @@ def __init__( self, *, host: str = "gkebackup.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -191,8 +191,8 @@ def __init__( def create_channel( cls, host: str = "gkebackup.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc_asyncio.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc_asyncio.py index 8f506b74f9c9..df3927a684e1 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc_asyncio.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc_asyncio.py @@ -13,26 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async -from google.api_core import operations_v1 +from google.api_core import gapic_v1, grpc_helpers_async, operations_v1 from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.gke_backup_v1.types import backup -from google.cloud.gke_backup_v1.types import backup_plan -from google.cloud.gke_backup_v1.types import gkebackup -from google.cloud.gke_backup_v1.types import restore -from google.cloud.gke_backup_v1.types import restore_plan -from google.cloud.gke_backup_v1.types import volume -from google.longrunning import operations_pb2 # type: ignore -from .base import BackupForGKETransport, DEFAULT_CLIENT_INFO +from google.cloud.gke_backup_v1.types import ( + backup, + backup_plan, + gkebackup, + restore, + restore_plan, + volume, +) + +from .base import DEFAULT_CLIENT_INFO, BackupForGKETransport from .grpc import BackupForGKEGrpcTransport @@ -58,7 +58,7 @@ class BackupForGKEGrpcAsyncIOTransport(BackupForGKETransport): def create_channel( cls, host: str = "gkebackup.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -101,15 +101,15 @@ def __init__( self, *, host: str = "gkebackup.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/rest.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/rest.py index ca86e988dc2d..f457c9337df8 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/rest.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/transports/rest.py @@ -14,25 +14,27 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import ( + gapic_v1, + operations_v1, + path_template, + rest_helpers, + rest_streaming, +) from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format -from google.api_core import operations_v1 +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -40,16 +42,19 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore -from google.cloud.gke_backup_v1.types import backup -from google.cloud.gke_backup_v1.types import backup_plan -from google.cloud.gke_backup_v1.types import gkebackup -from google.cloud.gke_backup_v1.types import restore -from google.cloud.gke_backup_v1.types import restore_plan -from google.cloud.gke_backup_v1.types import volume from google.longrunning import operations_pb2 # type: ignore -from .base import BackupForGKETransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from google.cloud.gke_backup_v1.types import ( + backup, + backup_plan, + gkebackup, + restore, + restore_plan, + volume, +) +from .base import BackupForGKETransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -819,10 +824,10 @@ def __init__( self, *, host: str = "gkebackup.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -941,7 +946,7 @@ def __call__( request: gkebackup.CreateBackupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the create backup method over HTTP. @@ -1037,7 +1042,7 @@ def __call__( request: gkebackup.CreateBackupPlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the create backup plan method over HTTP. @@ -1135,7 +1140,7 @@ def __call__( request: gkebackup.CreateRestoreRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the create restore method over HTTP. @@ -1231,7 +1236,7 @@ def __call__( request: gkebackup.CreateRestorePlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the create restore plan method over HTTP. @@ -1329,7 +1334,7 @@ def __call__( request: gkebackup.DeleteBackupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the delete backup method over HTTP. @@ -1414,7 +1419,7 @@ def __call__( request: gkebackup.DeleteBackupPlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the delete backup plan method over HTTP. @@ -1501,7 +1506,7 @@ def __call__( request: gkebackup.DeleteRestoreRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the delete restore method over HTTP. @@ -1586,7 +1591,7 @@ def __call__( request: gkebackup.DeleteRestorePlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the delete restore plan method over HTTP. @@ -1675,7 +1680,7 @@ def __call__( request: gkebackup.GetBackupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup.Backup: r"""Call the get backup method over HTTP. @@ -1767,7 +1772,7 @@ def __call__( request: gkebackup.GetBackupPlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> backup_plan.BackupPlan: r"""Call the get backup plan method over HTTP. @@ -1853,7 +1858,7 @@ def __call__( request: gkebackup.GetRestoreRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore.Restore: r"""Call the get restore method over HTTP. @@ -1941,7 +1946,7 @@ def __call__( request: gkebackup.GetRestorePlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> restore_plan.RestorePlan: r"""Call the get restore plan method over HTTP. @@ -2031,7 +2036,7 @@ def __call__( request: gkebackup.GetVolumeBackupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeBackup: r"""Call the get volume backup method over HTTP. @@ -2123,7 +2128,7 @@ def __call__( request: gkebackup.GetVolumeRestoreRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> volume.VolumeRestore: r"""Call the get volume restore method over HTTP. @@ -2212,7 +2217,7 @@ def __call__( request: gkebackup.ListBackupPlansRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListBackupPlansResponse: r"""Call the list backup plans method over HTTP. @@ -2298,7 +2303,7 @@ def __call__( request: gkebackup.ListBackupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListBackupsResponse: r"""Call the list backups method over HTTP. @@ -2382,7 +2387,7 @@ def __call__( request: gkebackup.ListRestorePlansRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListRestorePlansResponse: r"""Call the list restore plans method over HTTP. @@ -2470,7 +2475,7 @@ def __call__( request: gkebackup.ListRestoresRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListRestoresResponse: r"""Call the list restores method over HTTP. @@ -2554,7 +2559,7 @@ def __call__( request: gkebackup.ListVolumeBackupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListVolumeBackupsResponse: r"""Call the list volume backups method over HTTP. @@ -2644,7 +2649,7 @@ def __call__( request: gkebackup.ListVolumeRestoresRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gkebackup.ListVolumeRestoresResponse: r"""Call the list volume restores method over HTTP. @@ -2734,7 +2739,7 @@ def __call__( request: gkebackup.UpdateBackupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the update backup method over HTTP. @@ -2828,7 +2833,7 @@ def __call__( request: gkebackup.UpdateBackupPlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the update backup plan method over HTTP. @@ -2924,7 +2929,7 @@ def __call__( request: gkebackup.UpdateRestoreRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the update restore method over HTTP. @@ -3018,7 +3023,7 @@ def __call__( request: gkebackup.UpdateRestorePlanRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Call the update restore plan method over HTTP. diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/__init__.py index 87626c303f7d..8173c4845cf8 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/__init__.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/__init__.py @@ -13,18 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .backup import ( - Backup, -) -from .backup_plan import ( - BackupPlan, -) -from .common import ( - EncryptionKey, - NamespacedName, - NamespacedNames, - Namespaces, -) +from .backup import Backup +from .backup_plan import BackupPlan +from .common import EncryptionKey, NamespacedName, NamespacedNames, Namespaces from .gkebackup import ( CreateBackupPlanRequest, CreateBackupRequest, @@ -58,17 +49,9 @@ UpdateRestorePlanRequest, UpdateRestoreRequest, ) -from .restore import ( - Restore, - RestoreConfig, -) -from .restore_plan import ( - RestorePlan, -) -from .volume import ( - VolumeBackup, - VolumeRestore, -) +from .restore import Restore, RestoreConfig +from .restore_plan import RestorePlan +from .volume import VolumeBackup, VolumeRestore __all__ = ( "Backup", diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup.py index e60eddd211a7..eb22767d604a 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence -from google.cloud.gke_backup_v1.types import common from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.gke_backup_v1.types import common __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -59,7 +60,7 @@ class Backup(proto.Message): Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): A set of custom labels supplied by user. delete_lock_days (int): Minimum age for this Backup (in days). If this field is set @@ -202,7 +203,7 @@ class ClusterMetadata(proto.Message): k8s_version (str): The Kubernetes server version of the source cluster. - backup_crd_versions (Mapping[str, str]): + backup_crd_versions (MutableMapping[str, str]): A list of the Backup for GKE CRD versions found in the cluster. gke_version (str): @@ -215,149 +216,149 @@ class ClusterMetadata(proto.Message): This field is a member of `oneof`_ ``platform_version``. """ - cluster = proto.Field( + cluster: str = proto.Field( proto.STRING, number=1, ) - k8s_version = proto.Field( + k8s_version: str = proto.Field( proto.STRING, number=2, ) - backup_crd_versions = proto.MapField( + backup_crd_versions: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=3, ) - gke_version = proto.Field( + gke_version: str = proto.Field( proto.STRING, number=4, oneof="platform_version", ) - anthos_version = proto.Field( + anthos_version: str = proto.Field( proto.STRING, number=5, oneof="platform_version", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - manual = proto.Field( + manual: bool = proto.Field( proto.BOOL, number=5, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=6, ) - delete_lock_days = proto.Field( + delete_lock_days: int = proto.Field( proto.INT32, number=7, ) - delete_lock_expire_time = proto.Field( + delete_lock_expire_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp, ) - retain_days = proto.Field( + retain_days: int = proto.Field( proto.INT32, number=9, ) - retain_expire_time = proto.Field( + retain_expire_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=10, message=timestamp_pb2.Timestamp, ) - encryption_key = proto.Field( + encryption_key: common.EncryptionKey = proto.Field( proto.MESSAGE, number=11, message=common.EncryptionKey, ) - all_namespaces = proto.Field( + all_namespaces: bool = proto.Field( proto.BOOL, number=12, oneof="backup_scope", ) - selected_namespaces = proto.Field( + selected_namespaces: common.Namespaces = proto.Field( proto.MESSAGE, number=13, oneof="backup_scope", message=common.Namespaces, ) - selected_applications = proto.Field( + selected_applications: common.NamespacedNames = proto.Field( proto.MESSAGE, number=14, oneof="backup_scope", message=common.NamespacedNames, ) - contains_volume_data = proto.Field( + contains_volume_data: bool = proto.Field( proto.BOOL, number=15, ) - contains_secrets = proto.Field( + contains_secrets: bool = proto.Field( proto.BOOL, number=16, ) - cluster_metadata = proto.Field( + cluster_metadata: ClusterMetadata = proto.Field( proto.MESSAGE, number=17, message=ClusterMetadata, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=18, enum=State, ) - state_reason = proto.Field( + state_reason: str = proto.Field( proto.STRING, number=19, ) - complete_time = proto.Field( + complete_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=20, message=timestamp_pb2.Timestamp, ) - resource_count = proto.Field( + resource_count: int = proto.Field( proto.INT32, number=21, ) - volume_count = proto.Field( + volume_count: int = proto.Field( proto.INT32, number=22, ) - size_bytes = proto.Field( + size_bytes: int = proto.Field( proto.INT64, number=23, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=24, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=25, ) - pod_count = proto.Field( + pod_count: int = proto.Field( proto.INT32, number=26, ) - config_backup_size_bytes = proto.Field( + config_backup_size_bytes: int = proto.Field( proto.INT64, number=27, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup_plan.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup_plan.py index a6f190953929..51dd99b210b8 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup_plan.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/backup_plan.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence -from google.cloud.gke_backup_v1.types import common from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.gke_backup_v1.types import common __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -57,7 +58,7 @@ class BackupPlan(proto.Message): retention_policy (google.cloud.gke_backup_v1.types.BackupPlan.RetentionPolicy): RetentionPolicy governs lifecycle of Backups created under this plan. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): A set of custom labels supplied by user. backup_schedule (google.cloud.gke_backup_v1.types.BackupPlan.Schedule): Defines a schedule for automatic Backup @@ -131,15 +132,15 @@ class RetentionPolicy(proto.Message): Default: False """ - backup_delete_lock_days = proto.Field( + backup_delete_lock_days: int = proto.Field( proto.INT32, number=1, ) - backup_retain_days = proto.Field( + backup_retain_days: int = proto.Field( proto.INT32, number=2, ) - locked = proto.Field( + locked: bool = proto.Field( proto.BOOL, number=3, ) @@ -162,11 +163,11 @@ class Schedule(proto.Message): Default: False """ - cron_schedule = proto.Field( + cron_schedule: str = proto.Field( proto.STRING, number=1, ) - paused = proto.Field( + paused: bool = proto.Field( proto.BOOL, number=2, ) @@ -217,92 +218,92 @@ class BackupConfig(proto.Message): not be encrypted. """ - all_namespaces = proto.Field( + all_namespaces: bool = proto.Field( proto.BOOL, number=1, oneof="backup_scope", ) - selected_namespaces = proto.Field( + selected_namespaces: common.Namespaces = proto.Field( proto.MESSAGE, number=2, oneof="backup_scope", message=common.Namespaces, ) - selected_applications = proto.Field( + selected_applications: common.NamespacedNames = proto.Field( proto.MESSAGE, number=3, oneof="backup_scope", message=common.NamespacedNames, ) - include_volume_data = proto.Field( + include_volume_data: bool = proto.Field( proto.BOOL, number=4, ) - include_secrets = proto.Field( + include_secrets: bool = proto.Field( proto.BOOL, number=5, ) - encryption_key = proto.Field( + encryption_key: common.EncryptionKey = proto.Field( proto.MESSAGE, number=6, message=common.EncryptionKey, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=5, ) - cluster = proto.Field( + cluster: str = proto.Field( proto.STRING, number=6, ) - retention_policy = proto.Field( + retention_policy: RetentionPolicy = proto.Field( proto.MESSAGE, number=7, message=RetentionPolicy, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=8, ) - backup_schedule = proto.Field( + backup_schedule: Schedule = proto.Field( proto.MESSAGE, number=9, message=Schedule, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=10, ) - deactivated = proto.Field( + deactivated: bool = proto.Field( proto.BOOL, number=11, ) - backup_config = proto.Field( + backup_config: BackupConfig = proto.Field( proto.MESSAGE, number=12, message=BackupConfig, ) - protected_pod_count = proto.Field( + protected_pod_count: int = proto.Field( proto.INT32, number=13, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/common.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/common.py index 6de7a4ae7bec..724a053b319f 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/common.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/common.py @@ -13,8 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -31,11 +32,11 @@ class Namespaces(proto.Message): r"""A list of Kubernetes Namespaces Attributes: - namespaces (Sequence[str]): + namespaces (MutableSequence[str]): A list of Kubernetes Namespaces """ - namespaces = proto.RepeatedField( + namespaces: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) @@ -51,11 +52,11 @@ class NamespacedName(proto.Message): The name of the Kubernetes resource. """ - namespace = proto.Field( + namespace: str = proto.Field( proto.STRING, number=1, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=2, ) @@ -65,11 +66,11 @@ class NamespacedNames(proto.Message): r"""A list of namespaced Kubernetes resources. Attributes: - namespaced_names (Sequence[google.cloud.gke_backup_v1.types.NamespacedName]): + namespaced_names (MutableSequence[google.cloud.gke_backup_v1.types.NamespacedName]): A list of namespaced Kubernetes resources. """ - namespaced_names = proto.RepeatedField( + namespaced_names: MutableSequence["NamespacedName"] = proto.RepeatedField( proto.MESSAGE, number=1, message="NamespacedName", @@ -86,7 +87,7 @@ class EncryptionKey(proto.Message): ``projects/*/locations/*/keyRings/*/cryptoKeys/*`` """ - gcp_kms_encryption_key = proto.Field( + gcp_kms_encryption_key: str = proto.Field( proto.STRING, number=1, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/gkebackup.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/gkebackup.py index 48f0aed8f310..3d7c076cc339 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/gkebackup.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/gkebackup.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore from google.cloud.gke_backup_v1.types import backup as gcg_backup @@ -20,9 +24,6 @@ from google.cloud.gke_backup_v1.types import restore as gcg_restore from google.cloud.gke_backup_v1.types import restore_plan as gcg_restore_plan from google.cloud.gke_backup_v1.types import volume -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore - __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -92,33 +93,33 @@ class OperationMetadata(proto.Message): operation. """ - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=3, ) - verb = proto.Field( + verb: str = proto.Field( proto.STRING, number=4, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=5, ) - requested_cancellation = proto.Field( + requested_cancellation: bool = proto.Field( proto.BOOL, number=6, ) - api_version = proto.Field( + api_version: str = proto.Field( proto.STRING, number=7, ) @@ -145,16 +146,16 @@ class CreateBackupPlanRequest(proto.Message): - be unique within the set of BackupPlans in this location """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - backup_plan = proto.Field( + backup_plan: gcg_backup_plan.BackupPlan = proto.Field( proto.MESSAGE, number=2, message=gcg_backup_plan.BackupPlan, ) - backup_plan_id = proto.Field( + backup_plan_id: str = proto.Field( proto.STRING, number=3, ) @@ -189,23 +190,23 @@ class ListBackupPlansRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -215,7 +216,7 @@ class ListBackupPlansResponse(proto.Message): r"""Response message for ListBackupPlans. Attributes: - backup_plans (Sequence[google.cloud.gke_backup_v1.types.BackupPlan]): + backup_plans (MutableSequence[google.cloud.gke_backup_v1.types.BackupPlan]): The list of BackupPlans matching the given criteria. next_page_token (str): @@ -224,7 +225,7 @@ class ListBackupPlansResponse(proto.Message): in a subsequent ``ListBackupPlans`` call to retrieve the next page of results. If this field is omitted or empty, then there are no more results to return. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -232,16 +233,16 @@ class ListBackupPlansResponse(proto.Message): def raw_page(self): return self - backup_plans = proto.RepeatedField( + backup_plans: MutableSequence[gcg_backup_plan.BackupPlan] = proto.RepeatedField( proto.MESSAGE, number=1, message=gcg_backup_plan.BackupPlan, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -256,7 +257,7 @@ class GetBackupPlanRequest(proto.Message): ``projects/*/locations/*/backupPlans/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -283,12 +284,12 @@ class UpdateBackupPlanRequest(proto.Message): ignored and are not used to update the target BackupPlan. """ - backup_plan = proto.Field( + backup_plan: gcg_backup_plan.BackupPlan = proto.Field( proto.MESSAGE, number=1, message=gcg_backup_plan.BackupPlan, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -309,11 +310,11 @@ class DeleteBackupPlanRequest(proto.Message): the request is rejected. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=2, ) @@ -339,16 +340,16 @@ class CreateBackupRequest(proto.Message): - be unique within the set of Backups in this BackupPlan """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - backup = proto.Field( + backup: gcg_backup.Backup = proto.Field( proto.MESSAGE, number=2, message=gcg_backup.Backup, ) - backup_id = proto.Field( + backup_id: str = proto.Field( proto.STRING, number=3, ) @@ -383,23 +384,23 @@ class ListBackupsRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -409,7 +410,7 @@ class ListBackupsResponse(proto.Message): r"""Response message for ListBackups. Attributes: - backups (Sequence[google.cloud.gke_backup_v1.types.Backup]): + backups (MutableSequence[google.cloud.gke_backup_v1.types.Backup]): The list of Backups matching the given criteria. next_page_token (str): @@ -424,12 +425,12 @@ class ListBackupsResponse(proto.Message): def raw_page(self): return self - backups = proto.RepeatedField( + backups: MutableSequence[gcg_backup.Backup] = proto.RepeatedField( proto.MESSAGE, number=1, message=gcg_backup.Backup, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -444,7 +445,7 @@ class GetBackupRequest(proto.Message): ``projects/*/locations/*/backupPlans/*/backups/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -470,12 +471,12 @@ class UpdateBackupRequest(proto.Message): Backup. """ - backup = proto.Field( + backup: gcg_backup.Backup = proto.Field( proto.MESSAGE, number=1, message=gcg_backup.Backup, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -501,15 +502,15 @@ class DeleteBackupRequest(proto.Message): VolumeBackups. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=2, ) - force = proto.Field( + force: bool = proto.Field( proto.BOOL, number=3, ) @@ -545,23 +546,23 @@ class ListVolumeBackupsRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -571,7 +572,7 @@ class ListVolumeBackupsResponse(proto.Message): r"""Response message for ListVolumeBackups. Attributes: - volume_backups (Sequence[google.cloud.gke_backup_v1.types.VolumeBackup]): + volume_backups (MutableSequence[google.cloud.gke_backup_v1.types.VolumeBackup]): The list of VolumeBackups matching the given criteria. next_page_token (str): @@ -586,12 +587,12 @@ class ListVolumeBackupsResponse(proto.Message): def raw_page(self): return self - volume_backups = proto.RepeatedField( + volume_backups: MutableSequence[volume.VolumeBackup] = proto.RepeatedField( proto.MESSAGE, number=1, message=volume.VolumeBackup, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -606,7 +607,7 @@ class GetVolumeBackupRequest(proto.Message): ``projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -633,16 +634,16 @@ class CreateRestorePlanRequest(proto.Message): - be unique within the set of RestorePlans in this location """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - restore_plan = proto.Field( + restore_plan: gcg_restore_plan.RestorePlan = proto.Field( proto.MESSAGE, number=2, message=gcg_restore_plan.RestorePlan, ) - restore_plan_id = proto.Field( + restore_plan_id: str = proto.Field( proto.STRING, number=3, ) @@ -677,23 +678,23 @@ class ListRestorePlansRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -703,7 +704,7 @@ class ListRestorePlansResponse(proto.Message): r"""Response message for ListRestorePlans. Attributes: - restore_plans (Sequence[google.cloud.gke_backup_v1.types.RestorePlan]): + restore_plans (MutableSequence[google.cloud.gke_backup_v1.types.RestorePlan]): The list of RestorePlans matching the given criteria. next_page_token (str): @@ -712,7 +713,7 @@ class ListRestorePlansResponse(proto.Message): in a subsequent ``ListRestorePlans`` call to retrieve the next page of results. If this field is omitted or empty, then there are no more results to return. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -720,16 +721,16 @@ class ListRestorePlansResponse(proto.Message): def raw_page(self): return self - restore_plans = proto.RepeatedField( + restore_plans: MutableSequence[gcg_restore_plan.RestorePlan] = proto.RepeatedField( proto.MESSAGE, number=1, message=gcg_restore_plan.RestorePlan, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -744,7 +745,7 @@ class GetRestorePlanRequest(proto.Message): ``projects/*/locations/*/restorePlans/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -770,12 +771,12 @@ class UpdateRestorePlanRequest(proto.Message): update the target RestorePlan. """ - restore_plan = proto.Field( + restore_plan: gcg_restore_plan.RestorePlan = proto.Field( proto.MESSAGE, number=1, message=gcg_restore_plan.RestorePlan, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -801,15 +802,15 @@ class DeleteRestorePlanRequest(proto.Message): no Restores. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=2, ) - force = proto.Field( + force: bool = proto.Field( proto.BOOL, number=3, ) @@ -835,16 +836,16 @@ class CreateRestoreRequest(proto.Message): - be unique within the set of Restores in this RestorePlan. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - restore = proto.Field( + restore: gcg_restore.Restore = proto.Field( proto.MESSAGE, number=2, message=gcg_restore.Restore, ) - restore_id = proto.Field( + restore_id: str = proto.Field( proto.STRING, number=3, ) @@ -879,23 +880,23 @@ class ListRestoresRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -905,7 +906,7 @@ class ListRestoresResponse(proto.Message): r"""Response message for ListRestores. Attributes: - restores (Sequence[google.cloud.gke_backup_v1.types.Restore]): + restores (MutableSequence[google.cloud.gke_backup_v1.types.Restore]): The list of Restores matching the given criteria. next_page_token (str): @@ -914,7 +915,7 @@ class ListRestoresResponse(proto.Message): in a subsequent ``ListRestores`` call to retrieve the next page of results. If this field is omitted or empty, then there are no more results to return. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -922,16 +923,16 @@ class ListRestoresResponse(proto.Message): def raw_page(self): return self - restores = proto.RepeatedField( + restores: MutableSequence[gcg_restore.Restore] = proto.RepeatedField( proto.MESSAGE, number=1, message=gcg_restore.Restore, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -946,7 +947,7 @@ class GetRestoreRequest(proto.Message): ``projects/*/locations/*/restorePlans/*/restores/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -972,12 +973,12 @@ class UpdateRestoreRequest(proto.Message): target Restore. """ - restore = proto.Field( + restore: gcg_restore.Restore = proto.Field( proto.MESSAGE, number=1, message=gcg_restore.Restore, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -1003,15 +1004,15 @@ class DeleteRestoreRequest(proto.Message): VolumeRestores. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=2, ) - force = proto.Field( + force: bool = proto.Field( proto.BOOL, number=3, ) @@ -1047,23 +1048,23 @@ class ListVolumeRestoresRequest(proto.Message): Field by which to sort the results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -1073,7 +1074,7 @@ class ListVolumeRestoresResponse(proto.Message): r"""Response message for ListVolumeRestores. Attributes: - volume_restores (Sequence[google.cloud.gke_backup_v1.types.VolumeRestore]): + volume_restores (MutableSequence[google.cloud.gke_backup_v1.types.VolumeRestore]): The list of VolumeRestores matching the given criteria. next_page_token (str): @@ -1088,12 +1089,12 @@ class ListVolumeRestoresResponse(proto.Message): def raw_page(self): return self - volume_restores = proto.RepeatedField( + volume_restores: MutableSequence[volume.VolumeRestore] = proto.RepeatedField( proto.MESSAGE, number=1, message=volume.VolumeRestore, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -1108,7 +1109,7 @@ class GetVolumeRestoreRequest(proto.Message): ``projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore.py index f0303b8d1fb1..02f1a4c44a6f 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence -from google.cloud.gke_backup_v1.types import common from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.gke_backup_v1.types import common __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -71,7 +72,7 @@ class Restore(proto.Message): Output only. Configuration of the Restore. Inherited from parent RestorePlan's [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): A set of custom labels supplied by user. state (google.cloud.gke_backup_v1.types.Restore.State): Output only. The current state of the @@ -116,77 +117,77 @@ class State(proto.Enum): FAILED = 4 DELETING = 5 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=5, ) - backup = proto.Field( + backup: str = proto.Field( proto.STRING, number=6, ) - cluster = proto.Field( + cluster: str = proto.Field( proto.STRING, number=7, ) - restore_config = proto.Field( + restore_config: "RestoreConfig" = proto.Field( proto.MESSAGE, number=8, message="RestoreConfig", ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=9, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=10, enum=State, ) - state_reason = proto.Field( + state_reason: str = proto.Field( proto.STRING, number=11, ) - complete_time = proto.Field( + complete_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=12, message=timestamp_pb2.Timestamp, ) - resources_restored_count = proto.Field( + resources_restored_count: int = proto.Field( proto.INT32, number=13, ) - resources_excluded_count = proto.Field( + resources_excluded_count: int = proto.Field( proto.INT32, number=14, ) - resources_failed_count = proto.Field( + resources_failed_count: int = proto.Field( proto.INT32, number=15, ) - volumes_restored_count = proto.Field( + volumes_restored_count: int = proto.Field( proto.INT32, number=16, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=17, ) @@ -243,7 +244,7 @@ class RestoreConfig(proto.Message): restored. This field is a member of `oneof`_ ``namespaced_resource_restore_scope``. - substitution_rules (Sequence[google.cloud.gke_backup_v1.types.RestoreConfig.SubstitutionRule]): + substitution_rules (MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.SubstitutionRule]): A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules @@ -294,11 +295,11 @@ class GroupKind(proto.Message): "CustomResourceDefinition", "StorageClass", etc. """ - resource_group = proto.Field( + resource_group: str = proto.Field( proto.STRING, number=1, ) - resource_kind = proto.Field( + resource_kind: str = proto.Field( proto.STRING, number=2, ) @@ -308,7 +309,7 @@ class ClusterResourceRestoreScope(proto.Message): Backup. Attributes: - selected_group_kinds (Sequence[google.cloud.gke_backup_v1.types.RestoreConfig.GroupKind]): + selected_group_kinds (MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.GroupKind]): A list of "types" of cluster-scoped resources to be restored from the Backup. An empty list means that NO cluster-scoped resources will be @@ -317,7 +318,9 @@ class ClusterResourceRestoreScope(proto.Message): separately and is not governed by this field. """ - selected_group_kinds = proto.RepeatedField( + selected_group_kinds: MutableSequence[ + "RestoreConfig.GroupKind" + ] = proto.RepeatedField( proto.MESSAGE, number=1, message="RestoreConfig.GroupKind", @@ -330,7 +333,7 @@ class SubstitutionRule(proto.Message): to substitution) and substitution logic. Attributes: - target_namespaces (Sequence[str]): + target_namespaces (MutableSequence[str]): (Filtering parameter) Any resource subject to substitution must be contained within one of the listed Kubernetes Namespace in the Backup. If @@ -341,7 +344,7 @@ class SubstitutionRule(proto.Message): To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces. - target_group_kinds (Sequence[google.cloud.gke_backup_v1.types.RestoreConfig.GroupKind]): + target_group_kinds (MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.GroupKind]): (Filtering parameter) Any resource subject to substitution must belong to one of the listed "types". If this field is not provided, no type @@ -376,66 +379,68 @@ class SubstitutionRule(proto.Message): to the empty string (""). """ - target_namespaces = proto.RepeatedField( + target_namespaces: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - target_group_kinds = proto.RepeatedField( + target_group_kinds: MutableSequence[ + "RestoreConfig.GroupKind" + ] = proto.RepeatedField( proto.MESSAGE, number=2, message="RestoreConfig.GroupKind", ) - target_json_path = proto.Field( + target_json_path: str = proto.Field( proto.STRING, number=3, ) - original_value_pattern = proto.Field( + original_value_pattern: str = proto.Field( proto.STRING, number=4, ) - new_value = proto.Field( + new_value: str = proto.Field( proto.STRING, number=5, ) - volume_data_restore_policy = proto.Field( + volume_data_restore_policy: VolumeDataRestorePolicy = proto.Field( proto.ENUM, number=1, enum=VolumeDataRestorePolicy, ) - cluster_resource_conflict_policy = proto.Field( + cluster_resource_conflict_policy: ClusterResourceConflictPolicy = proto.Field( proto.ENUM, number=2, enum=ClusterResourceConflictPolicy, ) - namespaced_resource_restore_mode = proto.Field( + namespaced_resource_restore_mode: NamespacedResourceRestoreMode = proto.Field( proto.ENUM, number=3, enum=NamespacedResourceRestoreMode, ) - cluster_resource_restore_scope = proto.Field( + cluster_resource_restore_scope: ClusterResourceRestoreScope = proto.Field( proto.MESSAGE, number=4, message=ClusterResourceRestoreScope, ) - all_namespaces = proto.Field( + all_namespaces: bool = proto.Field( proto.BOOL, number=5, oneof="namespaced_resource_restore_scope", ) - selected_namespaces = proto.Field( + selected_namespaces: common.Namespaces = proto.Field( proto.MESSAGE, number=6, oneof="namespaced_resource_restore_scope", message=common.Namespaces, ) - selected_applications = proto.Field( + selected_applications: common.NamespacedNames = proto.Field( proto.MESSAGE, number=7, oneof="namespaced_resource_restore_scope", message=common.NamespacedNames, ) - substitution_rules = proto.RepeatedField( + substitution_rules: MutableSequence[SubstitutionRule] = proto.RepeatedField( proto.MESSAGE, number=8, message=SubstitutionRule, diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore_plan.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore_plan.py index c1e5a1845b21..06f201950fb9 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore_plan.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/restore_plan.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence -from google.cloud.gke_backup_v1.types import restore from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.gke_backup_v1.types import restore __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -66,7 +67,7 @@ class RestorePlan(proto.Message): restore_config (google.cloud.gke_backup_v1.types.RestoreConfig): Required. Configuration of Restores created via this RestorePlan. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): A set of custom labels supplied by user. etag (str): Output only. ``etag`` is used for optimistic concurrency @@ -81,47 +82,47 @@ class RestorePlan(proto.Message): applied to the same version of the resource. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=5, ) - backup_plan = proto.Field( + backup_plan: str = proto.Field( proto.STRING, number=6, ) - cluster = proto.Field( + cluster: str = proto.Field( proto.STRING, number=7, ) - restore_config = proto.Field( + restore_config: restore.RestoreConfig = proto.Field( proto.MESSAGE, number=8, message=restore.RestoreConfig, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=9, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=10, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/volume.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/volume.py index 1cf759440be5..a49e4b429fee 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/volume.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/types/volume.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence -from google.cloud.gke_backup_v1.types import common from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.gke_backup_v1.types import common __protobuf__ = proto.module( package="google.cloud.gkebackup.v1", @@ -106,61 +107,61 @@ class State(proto.Enum): FAILED = 5 DELETING = 6 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - source_pvc = proto.Field( + source_pvc: common.NamespacedName = proto.Field( proto.MESSAGE, number=5, message=common.NamespacedName, ) - volume_backup_handle = proto.Field( + volume_backup_handle: str = proto.Field( proto.STRING, number=6, ) - format_ = proto.Field( + format_: VolumeBackupFormat = proto.Field( proto.ENUM, number=7, enum=VolumeBackupFormat, ) - storage_bytes = proto.Field( + storage_bytes: int = proto.Field( proto.INT64, number=8, ) - disk_size_bytes = proto.Field( + disk_size_bytes: int = proto.Field( proto.INT64, number=9, ) - complete_time = proto.Field( + complete_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=10, message=timestamp_pb2.Timestamp, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=11, enum=State, ) - state_message = proto.Field( + state_message: str = proto.Field( proto.STRING, number=12, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=13, ) @@ -232,57 +233,57 @@ class State(proto.Enum): FAILED = 4 DELETING = 5 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - uid = proto.Field( + uid: str = proto.Field( proto.STRING, number=2, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - volume_backup = proto.Field( + volume_backup: str = proto.Field( proto.STRING, number=5, ) - target_pvc = proto.Field( + target_pvc: common.NamespacedName = proto.Field( proto.MESSAGE, number=6, message=common.NamespacedName, ) - volume_handle = proto.Field( + volume_handle: str = proto.Field( proto.STRING, number=7, ) - volume_type = proto.Field( + volume_type: VolumeType = proto.Field( proto.ENUM, number=8, enum=VolumeType, ) - complete_time = proto.Field( + complete_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=9, message=timestamp_pb2.Timestamp, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=10, enum=State, ) - state_message = proto.Field( + state_message: str = proto.Field( proto.STRING, number=11, ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=12, ) diff --git a/packages/google-cloud-gke-backup/noxfile.py b/packages/google-cloud-gke-backup/noxfile.py index d752b54f56da..d8440c023805 100644 --- a/packages/google-cloud-gke-backup/noxfile.py +++ b/packages/google-cloud-gke-backup/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import re diff --git a/packages/google-cloud-gke-backup/owlbot.py b/packages/google-cloud-gke-backup/owlbot.py index 01c182013e6f..9e103478a0ed 100644 --- a/packages/google-cloud-gke-backup/owlbot.py +++ b/packages/google-cloud-gke-backup/owlbot.py @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json from pathlib import Path +import shutil import synthtool as s import synthtool.gcp as gcp @@ -22,9 +24,18 @@ # Copy the generated client from the owl-bot staging directory # ---------------------------------------------------------------------------- -default_version = "v1" +clean_up_generated_samples = True + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) for library in s.get_staging_dirs(default_version): + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False + # Apply workarounds to fix the generated docstrings. # Issue filed upstream in https://github.com/googleapis/gapic-generator-python/issues/1345 s.replace( @@ -207,7 +218,8 @@ """``projects/*/locations/*/keyRings/*/cryptoKeys/*``""", ) - s.move(library, excludes=["google/cloud/gke_backup/", "setup.py"]) + s.move([library], excludes=["**/gapic_version.py"]) + s.remove_staging_dirs() # ---------------------------------------------------------------------------- @@ -215,14 +227,14 @@ # ---------------------------------------------------------------------------- templated_files = gcp.CommonTemplates().py_library( + cov_level=100, microgenerator=True, versions=gcp.common.detect_versions(path="./google", default_first=True), ) -s.move(templated_files, excludes=[".coveragerc"]) # the microgenerator has a good coveragerc file +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"]) python.py_samples(skip_readmes=True) - -# run blacken session for all directories which have a noxfile +# run format session for all directories which have a noxfile for noxfile in Path(".").glob("**/noxfile.py"): - s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/packages/google-cloud-gke-backup/release-please-config.json b/packages/google-cloud-gke-backup/release-please-config.json new file mode 100644 index 000000000000..d6665f3e3956 --- /dev/null +++ b/packages/google-cloud-gke-backup/release-please-config.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/gke_backup/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.gkebackup.v1.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py deleted file mode 100644 index 2c0b8fa9f78e..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync_ba40475b] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup_plan = gke_backup_v1.BackupPlan() - backup_plan.cluster = "cluster_value" - - request = gke_backup_v1.CreateBackupPlanRequest( - parent="parent_value", - backup_plan=backup_plan, - backup_plan_id="backup_plan_id_value", - ) - - # Make the request - operation = client.create_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync_ba40475b] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py deleted file mode 100644 index 8cdfbd507730..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync_f9f9cad1] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup_plan = gke_backup_v1.BackupPlan() - backup_plan.cluster = "cluster_value" - - request = gke_backup_v1.CreateBackupPlanRequest( - parent="parent_value", - backup_plan=backup_plan, - backup_plan_id="backup_plan_id_value", - ) - - # Make the request - operation = client.create_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync_f9f9cad1] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py deleted file mode 100644 index 64e891c77b56..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateBackup_sync_a203f0cf] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.CreateBackupRequest( - parent="parent_value", - ) - - # Make the request - operation = client.create_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateBackup_sync_a203f0cf] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py deleted file mode 100644 index 49a8c6bf3b6a..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateBackup_sync_fc39e6b6] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.CreateBackupRequest( - parent="parent_value", - ) - - # Make the request - operation = client.create_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateBackup_sync_fc39e6b6] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py deleted file mode 100644 index dbe7d6b75ec1..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync_2a7b82f0] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore_plan = gke_backup_v1.RestorePlan() - restore_plan.backup_plan = "backup_plan_value" - restore_plan.cluster = "cluster_value" - restore_plan.restore_config.all_namespaces = True - - request = gke_backup_v1.CreateRestorePlanRequest( - parent="parent_value", - restore_plan=restore_plan, - restore_plan_id="restore_plan_id_value", - ) - - # Make the request - operation = client.create_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync_2a7b82f0] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py deleted file mode 100644 index fe15be1c2ec0..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync_f481a3ea] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore_plan = gke_backup_v1.RestorePlan() - restore_plan.backup_plan = "backup_plan_value" - restore_plan.cluster = "cluster_value" - restore_plan.restore_config.all_namespaces = True - - request = gke_backup_v1.CreateRestorePlanRequest( - parent="parent_value", - restore_plan=restore_plan, - restore_plan_id="restore_plan_id_value", - ) - - # Make the request - operation = client.create_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync_f481a3ea] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py deleted file mode 100644 index f82fea90d9e0..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateRestore_sync_1b49290c] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore = gke_backup_v1.Restore() - restore.backup = "backup_value" - - request = gke_backup_v1.CreateRestoreRequest( - parent="parent_value", - restore=restore, - restore_id="restore_id_value", - ) - - # Make the request - operation = client.create_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateRestore_sync_1b49290c] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py deleted file mode 100644 index 6e8eb6308d8b..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_CreateRestore_sync_232e398c] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_create_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore = gke_backup_v1.Restore() - restore.backup = "backup_value" - - request = gke_backup_v1.CreateRestoreRequest( - parent="parent_value", - restore=restore, - restore_id="restore_id_value", - ) - - # Make the request - operation = client.create_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_CreateRestore_sync_232e398c] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py deleted file mode 100644 index d98b9ab582e8..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync_22193aa7] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteBackupPlanRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync_22193aa7] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py deleted file mode 100644 index 4067093aa75f..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync_af958d29] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteBackupPlanRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync_af958d29] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py deleted file mode 100644 index 74a99f3e3e33..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync_4e6838b6] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteBackupRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync_4e6838b6] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py deleted file mode 100644 index f9ffaef5610c..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync_ba357f30] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteBackupRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync_ba357f30] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py deleted file mode 100644 index f82308250a3e..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync_0dd6c9ab] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteRestorePlanRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync_0dd6c9ab] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py deleted file mode 100644 index 188e3a535043..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync_be5aebc4] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteRestorePlanRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync_be5aebc4] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py deleted file mode 100644 index cf276ab1b3f1..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync_384f893e] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteRestoreRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync_384f893e] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py deleted file mode 100644 index 772f7b8facff..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync_5725835d] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_delete_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.DeleteRestoreRequest( - name="name_value", - ) - - # Make the request - operation = client.delete_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync_5725835d] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py deleted file mode 100644 index 5c186baf9604..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync_28db290d] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetBackupPlanRequest( - name="name_value", - ) - - # Make the request - response = client.get_backup_plan(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync_28db290d] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py deleted file mode 100644 index 5d7f35f0f042..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync_afe8a7c5] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetBackupPlanRequest( - name="name_value", - ) - - # Make the request - response = client.get_backup_plan(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync_afe8a7c5] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py deleted file mode 100644 index 9915db0b6804..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetBackup_sync_07911578] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetBackupRequest( - name="name_value", - ) - - # Make the request - response = client.get_backup(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync_07911578] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py deleted file mode 100644 index 70c13cfc66dc..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetBackup_sync_e9cf234f] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetBackupRequest( - name="name_value", - ) - - # Make the request - response = client.get_backup(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync_e9cf234f] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py deleted file mode 100644 index 1be5dd530e00..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync_16da5c9f] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetRestorePlanRequest( - name="name_value", - ) - - # Make the request - response = client.get_restore_plan(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync_16da5c9f] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py deleted file mode 100644 index 5cadd16cef61..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync_c4c27d89] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetRestorePlanRequest( - name="name_value", - ) - - # Make the request - response = client.get_restore_plan(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync_c4c27d89] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py deleted file mode 100644 index d809ceb83bab..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetRestore_sync_5d9ab521] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetRestoreRequest( - name="name_value", - ) - - # Make the request - response = client.get_restore(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync_5d9ab521] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py deleted file mode 100644 index ee29897fec84..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetRestore_sync_9527929a] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetRestoreRequest( - name="name_value", - ) - - # Make the request - response = client.get_restore(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync_9527929a] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py deleted file mode 100644 index a4a095a1c562..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetVolumeBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync_315e3ab4] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_volume_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetVolumeBackupRequest( - name="name_value", - ) - - # Make the request - response = client.get_volume_backup(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync_315e3ab4] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py deleted file mode 100644 index 5402024e71d0..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetVolumeBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync_c8db7aee] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_volume_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetVolumeBackupRequest( - name="name_value", - ) - - # Make the request - response = client.get_volume_backup(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync_c8db7aee] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py deleted file mode 100644 index 28298682f792..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetVolumeRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync_746cfb01] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_volume_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetVolumeRestoreRequest( - name="name_value", - ) - - # Make the request - response = client.get_volume_restore(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync_746cfb01] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py deleted file mode 100644 index b04e1c77def7..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetVolumeRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync_8da989ef] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_get_volume_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.GetVolumeRestoreRequest( - name="name_value", - ) - - # Make the request - response = client.get_volume_restore(request=request) - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync_8da989ef] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py deleted file mode 100644 index a381f582cf70..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListBackupPlans -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync_5ec6dd54] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_backup_plans(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListBackupPlansRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_backup_plans(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync_5ec6dd54] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py deleted file mode 100644 index ce7b53233c5a..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListBackupPlans -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync_60016b65] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_backup_plans(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListBackupPlansRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_backup_plans(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync_60016b65] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py deleted file mode 100644 index 247ccca8c135..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListBackups -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListBackups_sync_7da6881e] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_backups(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListBackupsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_backups(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync_7da6881e] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py deleted file mode 100644 index f0675e16ae31..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListBackups -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListBackups_sync_a7e57cb2] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_backups(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListBackupsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_backups(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync_a7e57cb2] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py deleted file mode 100644 index 050d5ff08f2b..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListRestorePlans -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync_9e86e9ed] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_restore_plans(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListRestorePlansRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_restore_plans(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync_9e86e9ed] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py deleted file mode 100644 index f438dff4bb84..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListRestorePlans -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync_ac5c3de5] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_restore_plans(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListRestorePlansRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_restore_plans(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync_ac5c3de5] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py deleted file mode 100644 index 05b6b38a9ba4..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListRestores -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListRestores_sync_003c4a18] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_restores(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListRestoresRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_restores(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync_003c4a18] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py deleted file mode 100644 index dcdbc60af3fe..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListRestores -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListRestores_sync_c52e2c76] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_restores(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListRestoresRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_restores(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync_c52e2c76] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py deleted file mode 100644 index 817f9eb985c0..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListVolumeBackups -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync_66d26f94] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_volume_backups(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListVolumeBackupsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_volume_backups(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync_66d26f94] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py deleted file mode 100644 index 88d0efa1dc11..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListVolumeBackups -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync_b686a40a] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_volume_backups(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListVolumeBackupsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_volume_backups(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync_b686a40a] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py deleted file mode 100644 index 25817f20fadf..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListVolumeRestores -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync_96c127d6] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_volume_restores(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListVolumeRestoresRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_volume_restores(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync_96c127d6] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py deleted file mode 100644 index 578063950cf0..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListVolumeRestores -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync_e6df2c15] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_list_volume_restores(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - request = gke_backup_v1.ListVolumeRestoresRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_volume_restores(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync_e6df2c15] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py deleted file mode 100644 index 6bdb9f5749a2..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync_240d1e05] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup_plan = gke_backup_v1.BackupPlan() - backup_plan.cluster = "cluster_value" - - request = gke_backup_v1.UpdateBackupPlanRequest( - backup_plan=backup_plan, - ) - - # Make the request - operation = client.update_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync_240d1e05] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py deleted file mode 100644 index 54f6a89239fb..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateBackupPlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync_e9cd4e74] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_backup_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup_plan = gke_backup_v1.BackupPlan() - backup_plan.cluster = "cluster_value" - - request = gke_backup_v1.UpdateBackupPlanRequest( - backup_plan=backup_plan, - ) - - # Make the request - operation = client.update_backup_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync_e9cd4e74] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py deleted file mode 100644 index b26e5900cd1a..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync_701ec3bb] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup = gke_backup_v1.Backup() - backup.all_namespaces = True - - request = gke_backup_v1.UpdateBackupRequest( - backup=backup, - ) - - # Make the request - operation = client.update_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync_701ec3bb] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py deleted file mode 100644 index bcb020914dd5..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateBackup -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync_c44e40c5] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_backup(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - backup = gke_backup_v1.Backup() - backup.all_namespaces = True - - request = gke_backup_v1.UpdateBackupRequest( - backup=backup, - ) - - # Make the request - operation = client.update_backup(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync_c44e40c5] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py deleted file mode 100644 index b4ddc72b5b57..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync_a36705f8] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore_plan = gke_backup_v1.RestorePlan() - restore_plan.backup_plan = "backup_plan_value" - restore_plan.cluster = "cluster_value" - restore_plan.restore_config.all_namespaces = True - - request = gke_backup_v1.UpdateRestorePlanRequest( - restore_plan=restore_plan, - ) - - # Make the request - operation = client.update_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync_a36705f8] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py deleted file mode 100644 index acd9c8c6892f..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateRestorePlan -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync_b115a29d] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_restore_plan(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore_plan = gke_backup_v1.RestorePlan() - restore_plan.backup_plan = "backup_plan_value" - restore_plan.cluster = "cluster_value" - restore_plan.restore_config.all_namespaces = True - - request = gke_backup_v1.UpdateRestorePlanRequest( - restore_plan=restore_plan, - ) - - # Make the request - operation = client.update_restore_plan(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync_b115a29d] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py deleted file mode 100644 index 00fada9567d5..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync_01ce4e95] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore = gke_backup_v1.Restore() - restore.backup = "backup_value" - - request = gke_backup_v1.UpdateRestoreRequest( - restore=restore, - ) - - # Make the request - operation = client.update_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync_01ce4e95] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py deleted file mode 100644 index f87aafdb7148..000000000000 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateRestore -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-gke-backup - - -# [START gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync_f27381f8] -# This snippet has been automatically generated and should be regarded as a -# code template only. -# It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import gke_backup_v1 - - -def sample_update_restore(): - # Create a client - client = gke_backup_v1.BackupForGKEClient() - - # Initialize request argument(s) - restore = gke_backup_v1.Restore() - restore.backup = "backup_value" - - request = gke_backup_v1.UpdateRestoreRequest( - restore=restore, - ) - - # Make the request - operation = client.update_restore(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync_f27381f8] diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_gke backup_v1.json b/packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_google.cloud.gkebackup.v1.json similarity index 66% rename from packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_gke backup_v1.json rename to packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_google.cloud.gkebackup.v1.json index 06628c65fb69..7a6f9c3719c1 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_gke backup_v1.json +++ b/packages/google-cloud-gke-backup/samples/generated_samples/snippet_metadata_google.cloud.gkebackup.v1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-gke-backup" + "name": "google-cloud-gke-backup", + "version": "0.1.0" }, "snippets": [ { @@ -149,7 +150,7 @@ "shortName": "create_backup_plan" }, "description": "Sample for CreateBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py", + "file": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync", @@ -185,95 +186,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_ba40475b.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "CreateBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.CreateBackupPlanRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "backup_plan", - "type": "google.cloud.gke_backup_v1.types.BackupPlan" - }, - { - "name": "backup_plan_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_backup_plan" - }, - "description": "Sample for CreateBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync_f9f9cad1.py" + "title": "gkebackup_v1_generated_backup_for_gke_create_backup_plan_sync.py" }, { "canonical": true, @@ -414,95 +327,7 @@ "shortName": "create_backup" }, "description": "Sample for CreateBackup", - "file": "gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateBackup_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": "gkebackup_v1_generated_backup_for_gke_create_backup_sync_fc39e6b6.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "CreateBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.CreateBackupRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "backup", - "type": "google.cloud.gke_backup_v1.types.Backup" - }, - { - "name": "backup_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_backup" - }, - "description": "Sample for CreateBackup", - "file": "gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py", + "file": "gkebackup_v1_generated_backup_for_gke_create_backup_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateBackup_sync", @@ -538,7 +363,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_create_backup_sync_a203f0cf.py" + "title": "gkebackup_v1_generated_backup_for_gke_create_backup_sync.py" }, { "canonical": true, @@ -679,7 +504,7 @@ "shortName": "create_restore_plan" }, "description": "Sample for CreateRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py", + "file": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync", @@ -715,39 +540,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_2a7b82f0.py" + "title": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_restore_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.create_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestorePlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "CreateRestorePlan" + "shortName": "CreateRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.CreateRestorePlanRequest" + "type": "google.cloud.gke_backup_v1.types.CreateRestoreRequest" }, { "name": "parent", "type": "str" }, { - "name": "restore_plan", - "type": "google.cloud.gke_backup_v1.types.RestorePlan" + "name": "restore", + "type": "google.cloud.gke_backup_v1.types.Restore" }, { - "name": "restore_plan_id", + "name": "restore_id", "type": "str" }, { @@ -763,22 +589,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "create_restore_plan" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_restore" }, - "description": "Sample for CreateRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py", + "description": "Sample for CreateRestore", + "file": "gkebackup_v1_generated_backup_for_gke_create_restore_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_async", "segments": [ { - "end": 62, + "end": 60, "start": 27, "type": "FULL" }, { - "end": 62, + "end": 60, "start": 27, "type": "SHORT" }, @@ -788,32 +614,31 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 52, + "end": 50, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 59, - "start": 53, + "end": 57, + "start": 51, "type": "REQUEST_EXECUTION" }, { - "end": 63, - "start": 60, + "end": 61, + "start": 58, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_create_restore_plan_sync_f481a3ea.py" + "title": "gkebackup_v1_generated_backup_for_gke_create_restore_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.create_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_restore", "method": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", "service": { @@ -852,14 +677,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", + "resultType": "google.api_core.operation.Operation", "shortName": "create_restore" }, "description": "Sample for CreateRestore", - "file": "gkebackup_v1_generated_backup_for_gke_create_restore_async.py", + "file": "gkebackup_v1_generated_backup_for_gke_create_restore_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_sync", "segments": [ { "end": 60, @@ -892,39 +717,32 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_create_restore_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_create_restore_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "CreateRestore" + "shortName": "DeleteBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.CreateRestoreRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "restore", - "type": "google.cloud.gke_backup_v1.types.Restore" + "type": "google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest" }, { - "name": "restore_id", + "name": "name", "type": "str" }, { @@ -940,177 +758,8 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "create_restore" - }, - "description": "Sample for CreateRestore", - "file": "gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_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": "gkebackup_v1_generated_backup_for_gke_create_restore_sync_1b49290c.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.create_restore", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "CreateRestore" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.CreateRestoreRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "restore", - "type": "google.cloud.gke_backup_v1.types.Restore" - }, - { - "name": "restore_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_restore" - }, - "description": "Sample for CreateRestore", - "file": "gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_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": "gkebackup_v1_generated_backup_for_gke_create_restore_sync_232e398c.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest" - }, - { - "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_backup_plan" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_backup_plan" }, "description": "Sample for DeleteBackupPlan", "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py", @@ -1139,1543 +788,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 56, - "start": 53, - "type": "RESPONSE_HANDLING" - } - ], - "title": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest" - }, - { - "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_backup_plan" - }, - "description": "Sample for DeleteBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_af958d29.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest" - }, - { - "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_backup_plan" - }, - "description": "Sample for DeleteBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync_22193aa7.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupRequest" - }, - { - "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_backup" - }, - "description": "Sample for DeleteBackup", - "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_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": "gkebackup_v1_generated_backup_for_gke_delete_backup_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupRequest" - }, - { - "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_backup" - }, - "description": "Sample for DeleteBackup", - "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_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": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync_4e6838b6.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteBackupRequest" - }, - { - "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_backup" - }, - "description": "Sample for DeleteBackup", - "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_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": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync_ba357f30.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_restore_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestorePlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest" - }, - { - "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_restore_plan" - }, - "description": "Sample for DeleteRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestorePlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest" - }, - { - "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_restore_plan" - }, - "description": "Sample for DeleteRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_0dd6c9ab.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestorePlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest" - }, - { - "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_restore_plan" - }, - "description": "Sample for DeleteRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync_be5aebc4.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_restore", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestore" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestoreRequest" - }, - { - "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_restore" - }, - "description": "Sample for DeleteRestore", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestore" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestoreRequest" - }, - { - "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_restore" - }, - "description": "Sample for DeleteRestore", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync_5725835d.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "DeleteRestore" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.DeleteRestoreRequest" - }, - { - "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_restore" - }, - "description": "Sample for DeleteRestore", - "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_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": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync_384f893e.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupPlanRequest" - }, - { - "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.gke_backup_v1.types.BackupPlan", - "shortName": "get_backup_plan" - }, - "description": "Sample for GetBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupPlanRequest" - }, - { - "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.gke_backup_v1.types.BackupPlan", - "shortName": "get_backup_plan" - }, - "description": "Sample for GetBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_afe8a7c5.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackupPlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupPlanRequest" - }, - { - "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.gke_backup_v1.types.BackupPlan", - "shortName": "get_backup_plan" - }, - "description": "Sample for GetBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_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": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync_28db290d.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupRequest" - }, - { - "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.gke_backup_v1.types.Backup", - "shortName": "get_backup" - }, - "description": "Sample for GetBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackup_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": "gkebackup_v1_generated_backup_for_gke_get_backup_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupRequest" - }, - { - "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.gke_backup_v1.types.Backup", - "shortName": "get_backup" - }, - "description": "Sample for GetBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackup_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": "gkebackup_v1_generated_backup_for_gke_get_backup_sync_e9cf234f.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetBackup" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetBackupRequest" - }, - { - "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.gke_backup_v1.types.Backup", - "shortName": "get_backup" - }, - "description": "Sample for GetBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackup_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": "gkebackup_v1_generated_backup_for_gke_get_backup_sync_07911578.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_restore_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetRestorePlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestorePlanRequest" - }, - { - "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.gke_backup_v1.types.RestorePlan", - "shortName": "get_restore_plan" - }, - "description": "Sample for GetRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_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": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore_plan", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "GetRestorePlan" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestorePlanRequest" - }, - { - "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.gke_backup_v1.types.RestorePlan", - "shortName": "get_restore_plan" - }, - "description": "Sample for GetRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_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, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_c4c27d89.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py" }, { "canonical": true, @@ -2684,19 +807,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetRestorePlan" + "shortName": "DeleteBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestorePlanRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest" }, { "name": "name", @@ -2715,22 +838,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.RestorePlan", - "shortName": "get_restore_plan" + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_backup_plan" }, - "description": "Sample for GetRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py", + "description": "Sample for DeleteBackupPlan", + "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -2745,17 +868,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync_16da5c9f.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_backup_plan_sync.py" }, { "canonical": true, @@ -2765,19 +888,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetRestore" + "shortName": "DeleteBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteBackupRequest" }, { "name": "name", @@ -2796,22 +919,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.Restore", - "shortName": "get_restore" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_backup" }, - "description": "Sample for GetRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_async.py", + "description": "Sample for DeleteBackup", + "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestore_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_async", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -2826,17 +949,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_restore_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_backup_async.py" }, { "canonical": true, @@ -2845,19 +968,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetRestore" + "shortName": "DeleteBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteBackupRequest" }, { "name": "name", @@ -2876,22 +999,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.Restore", - "shortName": "get_restore" + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_backup" }, - "description": "Sample for GetRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py", + "description": "Sample for DeleteBackup", + "file": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestore_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -2906,38 +1029,39 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_restore_sync_5d9ab521.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_backup_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_restore_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetRestore" + "shortName": "DeleteRestorePlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest" }, { "name": "name", @@ -2956,22 +1080,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.Restore", - "shortName": "get_restore" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_restore_plan" }, - "description": "Sample for GetRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py", + "description": "Sample for DeleteRestorePlan", + "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestore_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_async", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -2986,39 +1110,38 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_restore_sync_9527929a.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_volume_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeBackup" + "shortName": "DeleteRestorePlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeBackupRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest" }, { "name": "name", @@ -3037,22 +1160,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeBackup", - "shortName": "get_volume_backup" + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_restore_plan" }, - "description": "Sample for GetVolumeBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_async.py", + "description": "Sample for DeleteRestorePlan", + "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -3067,38 +1190,39 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_restore_plan_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.delete_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeBackup" + "shortName": "DeleteRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeBackupRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteRestoreRequest" }, { "name": "name", @@ -3117,22 +1241,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeBackup", - "shortName": "get_volume_backup" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_restore" }, - "description": "Sample for GetVolumeBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py", + "description": "Sample for DeleteRestore", + "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_async", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -3147,17 +1271,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_315e3ab4.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_restore_async.py" }, { "canonical": true, @@ -3166,19 +1290,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.delete_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeBackup" + "shortName": "DeleteRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeBackupRequest" + "type": "google.cloud.gke_backup_v1.types.DeleteRestoreRequest" }, { "name": "name", @@ -3197,22 +1321,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeBackup", - "shortName": "get_volume_backup" + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_restore" }, - "description": "Sample for GetVolumeBackup", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py", + "description": "Sample for DeleteRestore", + "file": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync", "segments": [ { - "end": 51, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 55, "start": 27, "type": "SHORT" }, @@ -3227,17 +1351,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 48, + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync_c8db7aee.py" + "title": "gkebackup_v1_generated_backup_for_gke_delete_restore_sync.py" }, { "canonical": true, @@ -3247,19 +1371,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_volume_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeRestore" + "shortName": "GetBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.GetBackupPlanRequest" }, { "name": "name", @@ -3278,14 +1402,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeRestore", - "shortName": "get_volume_restore" + "resultType": "google.cloud.gke_backup_v1.types.BackupPlan", + "shortName": "get_backup_plan" }, - "description": "Sample for GetVolumeRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_async.py", + "description": "Sample for GetBackupPlan", + "file": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_async", "segments": [ { "end": 51, @@ -3318,7 +1442,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_async.py" }, { "canonical": true, @@ -3327,19 +1451,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeRestore" + "shortName": "GetBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.GetBackupPlanRequest" }, { "name": "name", @@ -3358,14 +1482,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeRestore", - "shortName": "get_volume_restore" + "resultType": "google.cloud.gke_backup_v1.types.BackupPlan", + "shortName": "get_backup_plan" }, - "description": "Sample for GetVolumeRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py", + "description": "Sample for GetBackupPlan", + "file": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync", "segments": [ { "end": 51, @@ -3398,28 +1522,29 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_746cfb01.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_backup_plan_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_restore", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "GetVolumeRestore" + "shortName": "GetBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest" + "type": "google.cloud.gke_backup_v1.types.GetBackupRequest" }, { "name": "name", @@ -3438,14 +1563,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.types.VolumeRestore", - "shortName": "get_volume_restore" + "resultType": "google.cloud.gke_backup_v1.types.Backup", + "shortName": "get_backup" }, - "description": "Sample for GetVolumeRestore", - "file": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py", + "description": "Sample for GetBackup", + "file": "gkebackup_v1_generated_backup_for_gke_get_backup_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackup_async", "segments": [ { "end": 51, @@ -3478,32 +1603,31 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync_8da989ef.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_backup_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_backup_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackupPlans" + "shortName": "GetBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupPlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetBackupRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3519,22 +1643,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansAsyncPager", - "shortName": "list_backup_plans" + "resultType": "google.cloud.gke_backup_v1.types.Backup", + "shortName": "get_backup" }, - "description": "Sample for ListBackupPlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_async.py", + "description": "Sample for GetBackup", + "file": "gkebackup_v1_generated_backup_for_gke_get_backup_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetBackup_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3554,36 +1678,37 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_backup_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backup_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_restore_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackupPlans" + "shortName": "GetRestorePlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupPlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetRestorePlanRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3599,22 +1724,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansPager", - "shortName": "list_backup_plans" + "resultType": "google.cloud.gke_backup_v1.types.RestorePlan", + "shortName": "get_restore_plan" }, - "description": "Sample for ListBackupPlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py", + "description": "Sample for GetRestorePlan", + "file": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_async", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3634,12 +1759,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_5ec6dd54.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_async.py" }, { "canonical": true, @@ -3648,22 +1773,22 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backup_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackupPlans" + "shortName": "GetRestorePlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupPlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetRestorePlanRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3679,22 +1804,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansPager", - "shortName": "list_backup_plans" + "resultType": "google.cloud.gke_backup_v1.types.RestorePlan", + "shortName": "get_restore_plan" }, - "description": "Sample for ListBackupPlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py", + "description": "Sample for GetRestorePlan", + "file": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3714,12 +1839,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync_60016b65.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_restore_plan_sync.py" }, { "canonical": true, @@ -3729,22 +1854,22 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackups" + "shortName": "GetRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.GetRestoreRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3760,22 +1885,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsAsyncPager", - "shortName": "list_backups" + "resultType": "google.cloud.gke_backup_v1.types.Restore", + "shortName": "get_restore" }, - "description": "Sample for ListBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_backups_async.py", + "description": "Sample for GetRestore", + "file": "gkebackup_v1_generated_backup_for_gke_get_restore_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackups_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestore_async", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3795,12 +1920,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backups_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_restore_async.py" }, { "canonical": true, @@ -3809,22 +1934,22 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackups" + "shortName": "GetRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.GetRestoreRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3840,22 +1965,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsPager", - "shortName": "list_backups" + "resultType": "google.cloud.gke_backup_v1.types.Restore", + "shortName": "get_restore" }, - "description": "Sample for ListBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py", + "description": "Sample for GetRestore", + "file": "gkebackup_v1_generated_backup_for_gke_get_restore_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackups_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetRestore_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3875,36 +2000,37 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backups_sync_a7e57cb2.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_restore_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_volume_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListBackups" + "shortName": "GetVolumeBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.GetVolumeBackupRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -3920,22 +2046,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsPager", - "shortName": "list_backups" + "resultType": "google.cloud.gke_backup_v1.types.VolumeBackup", + "shortName": "get_volume_backup" }, - "description": "Sample for ListBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py", + "description": "Sample for GetVolumeBackup", + "file": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackups_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_async", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -3955,37 +2081,36 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_backups_sync_7da6881e.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_restore_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestorePlans" + "shortName": "GetVolumeBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestorePlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetVolumeBackupRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -4001,22 +2126,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansAsyncPager", - "shortName": "list_restore_plans" + "resultType": "google.cloud.gke_backup_v1.types.VolumeBackup", + "shortName": "get_volume_backup" }, - "description": "Sample for ListRestorePlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_async.py", + "description": "Sample for GetVolumeBackup", + "file": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -4036,36 +2161,37 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_volume_backup_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restore_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.get_volume_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestorePlans" + "shortName": "GetVolumeRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestorePlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -4081,22 +2207,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansPager", - "shortName": "list_restore_plans" + "resultType": "google.cloud.gke_backup_v1.types.VolumeRestore", + "shortName": "get_volume_restore" }, - "description": "Sample for ListRestorePlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py", + "description": "Sample for GetVolumeRestore", + "file": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_async", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -4116,12 +2242,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_ac5c3de5.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_async.py" }, { "canonical": true, @@ -4130,22 +2256,22 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restore_plans", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.get_volume_restore", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestorePlans" + "shortName": "GetVolumeRestore" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestorePlansRequest" + "type": "google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest" }, { - "name": "parent", + "name": "name", "type": "str" }, { @@ -4161,22 +2287,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansPager", - "shortName": "list_restore_plans" + "resultType": "google.cloud.gke_backup_v1.types.VolumeRestore", + "shortName": "get_volume_restore" }, - "description": "Sample for ListRestorePlans", - "file": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py", + "description": "Sample for GetVolumeRestore", + "file": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -4196,12 +2322,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync_9e86e9ed.py" + "title": "gkebackup_v1_generated_backup_for_gke_get_volume_restore_sync.py" }, { "canonical": true, @@ -4211,19 +2337,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_backup_plans", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestores" + "shortName": "ListBackupPlans" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListBackupPlansRequest" }, { "name": "parent", @@ -4242,14 +2368,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresAsyncPager", - "shortName": "list_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansAsyncPager", + "shortName": "list_backup_plans" }, - "description": "Sample for ListRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_restores_async.py", + "description": "Sample for ListBackupPlans", + "file": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestores_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_async", "segments": [ { "end": 52, @@ -4282,7 +2408,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restores_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_async.py" }, { "canonical": true, @@ -4291,19 +2417,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backup_plans", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestores" + "shortName": "ListBackupPlans" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListBackupPlansRequest" }, { "name": "parent", @@ -4322,14 +2448,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresPager", - "shortName": "list_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansPager", + "shortName": "list_backup_plans" }, - "description": "Sample for ListRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py", + "description": "Sample for ListBackupPlans", + "file": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestores_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync", "segments": [ { "end": 52, @@ -4362,28 +2488,29 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restores_sync_003c4a18.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_backup_plans_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_backups", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListRestores" + "shortName": "ListBackups" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListBackupsRequest" }, { "name": "parent", @@ -4402,14 +2529,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresPager", - "shortName": "list_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsAsyncPager", + "shortName": "list_backups" }, - "description": "Sample for ListRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py", + "description": "Sample for ListBackups", + "file": "gkebackup_v1_generated_backup_for_gke_list_backups_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestores_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackups_async", "segments": [ { "end": 52, @@ -4442,29 +2569,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_restores_sync_c52e2c76.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_backups_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_volume_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_backups", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeBackups" + "shortName": "ListBackups" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.ListBackupsRequest" }, { "name": "parent", @@ -4483,14 +2609,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsAsyncPager", - "shortName": "list_volume_backups" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsPager", + "shortName": "list_backups" }, - "description": "Sample for ListVolumeBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_async.py", + "description": "Sample for ListBackups", + "file": "gkebackup_v1_generated_backup_for_gke_list_backups_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListBackups_sync", "segments": [ { "end": 52, @@ -4523,28 +2649,29 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_backups_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_restore_plans", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeBackups" + "shortName": "ListRestorePlans" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.ListRestorePlansRequest" }, { "name": "parent", @@ -4563,14 +2690,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsPager", - "shortName": "list_volume_backups" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansAsyncPager", + "shortName": "list_restore_plans" }, - "description": "Sample for ListVolumeBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py", + "description": "Sample for ListRestorePlans", + "file": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_async", "segments": [ { "end": 52, @@ -4603,7 +2730,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_b686a40a.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_async.py" }, { "canonical": true, @@ -4612,19 +2739,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_backups", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restore_plans", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeBackups" + "shortName": "ListRestorePlans" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest" + "type": "google.cloud.gke_backup_v1.types.ListRestorePlansRequest" }, { "name": "parent", @@ -4643,14 +2770,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsPager", - "shortName": "list_volume_backups" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansPager", + "shortName": "list_restore_plans" }, - "description": "Sample for ListVolumeBackups", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py", + "description": "Sample for ListRestorePlans", + "file": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync", "segments": [ { "end": 52, @@ -4683,7 +2810,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync_66d26f94.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_restore_plans_sync.py" }, { "canonical": true, @@ -4693,19 +2820,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_volume_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_restores", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeRestores" + "shortName": "ListRestores" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListRestoresRequest" }, { "name": "parent", @@ -4724,14 +2851,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresAsyncPager", - "shortName": "list_volume_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresAsyncPager", + "shortName": "list_restores" }, - "description": "Sample for ListVolumeRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_async.py", + "description": "Sample for ListRestores", + "file": "gkebackup_v1_generated_backup_for_gke_list_restores_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestores_async", "segments": [ { "end": 52, @@ -4764,7 +2891,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_restores_async.py" }, { "canonical": true, @@ -4773,19 +2900,19 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_restores", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeRestores" + "shortName": "ListRestores" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListRestoresRequest" }, { "name": "parent", @@ -4804,14 +2931,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresPager", - "shortName": "list_volume_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresPager", + "shortName": "list_restores" }, - "description": "Sample for ListVolumeRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py", + "description": "Sample for ListRestores", + "file": "gkebackup_v1_generated_backup_for_gke_list_restores_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListRestores_sync", "segments": [ { "end": 52, @@ -4844,28 +2971,29 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_e6df2c15.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_restores_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_restores", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_volume_backups", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "ListVolumeRestores" + "shortName": "ListVolumeBackups" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest" + "type": "google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest" }, { "name": "parent", @@ -4884,14 +3012,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresPager", - "shortName": "list_volume_restores" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsAsyncPager", + "shortName": "list_volume_backups" }, - "description": "Sample for ListVolumeRestores", - "file": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py", + "description": "Sample for ListVolumeBackups", + "file": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_async", "segments": [ { "end": 52, @@ -4924,37 +3052,32 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync_96c127d6.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_backup_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_backups", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateBackupPlan" + "shortName": "ListVolumeBackups" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest" - }, - { - "name": "backup_plan", - "type": "google.cloud.gke_backup_v1.types.BackupPlan" + "type": "google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest" }, { - "name": "update_mask", - "type": "google.protobuf.field_mask_pb2.FieldMask" + "name": "parent", + "type": "str" }, { "name": "retry", @@ -4969,22 +3092,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "update_backup_plan" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsPager", + "shortName": "list_volume_backups" }, - "description": "Sample for UpdateBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py", + "description": "Sample for ListVolumeBackups", + "file": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync", "segments": [ { - "end": 58, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 58, + "end": 52, "start": 27, "type": "SHORT" }, @@ -4994,51 +3117,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 55, - "start": 49, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 59, - "start": 56, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_volume_backups_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.list_volume_restores", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateBackupPlan" + "shortName": "ListVolumeRestores" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest" - }, - { - "name": "backup_plan", - "type": "google.cloud.gke_backup_v1.types.BackupPlan" + "type": "google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest" }, { - "name": "update_mask", - "type": "google.protobuf.field_mask_pb2.FieldMask" + "name": "parent", + "type": "str" }, { "name": "retry", @@ -5053,22 +3173,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "update_backup_plan" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresAsyncPager", + "shortName": "list_volume_restores" }, - "description": "Sample for UpdateBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py", + "description": "Sample for ListVolumeRestores", + "file": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_async", "segments": [ { - "end": 58, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 58, + "end": 52, "start": 27, "type": "SHORT" }, @@ -5078,22 +3198,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 55, - "start": 49, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 59, - "start": 56, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_e9cd4e74.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_async.py" }, { "canonical": true, @@ -5102,27 +3222,23 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.list_volume_restores", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateBackupPlan" + "shortName": "ListVolumeRestores" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest" - }, - { - "name": "backup_plan", - "type": "google.cloud.gke_backup_v1.types.BackupPlan" + "type": "google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest" }, { - "name": "update_mask", - "type": "google.protobuf.field_mask_pb2.FieldMask" + "name": "parent", + "type": "str" }, { "name": "retry", @@ -5137,22 +3253,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "update_backup_plan" + "resultType": "google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresPager", + "shortName": "list_volume_restores" }, - "description": "Sample for UpdateBackupPlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py", + "description": "Sample for ListVolumeRestores", + "file": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync", "segments": [ { - "end": 58, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 58, + "end": 52, "start": 27, "type": "SHORT" }, @@ -5162,22 +3278,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 55, - "start": 49, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 59, - "start": 56, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync_240d1e05.py" + "title": "gkebackup_v1_generated_backup_for_gke_list_volume_restores_sync.py" }, { "canonical": true, @@ -5187,23 +3303,23 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateBackup" + "shortName": "UpdateBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateBackupRequest" + "type": "google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest" }, { - "name": "backup", - "type": "google.cloud.gke_backup_v1.types.Backup" + "name": "backup_plan", + "type": "google.cloud.gke_backup_v1.types.BackupPlan" }, { "name": "update_mask", @@ -5223,13 +3339,13 @@ } ], "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "update_backup" + "shortName": "update_backup_plan" }, - "description": "Sample for UpdateBackup", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_async.py", + "description": "Sample for UpdateBackupPlan", + "file": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_async", "segments": [ { "end": 58, @@ -5262,7 +3378,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py" }, { "canonical": true, @@ -5271,23 +3387,23 @@ "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup_plan", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateBackup" + "shortName": "UpdateBackupPlan" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateBackupRequest" + "type": "google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest" }, { - "name": "backup", - "type": "google.cloud.gke_backup_v1.types.Backup" + "name": "backup_plan", + "type": "google.cloud.gke_backup_v1.types.BackupPlan" }, { "name": "update_mask", @@ -5307,13 +3423,13 @@ } ], "resultType": "google.api_core.operation.Operation", - "shortName": "update_backup" + "shortName": "update_backup_plan" }, - "description": "Sample for UpdateBackup", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py", + "description": "Sample for UpdateBackupPlan", + "file": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync", "segments": [ { "end": 58, @@ -5346,16 +3462,17 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_sync_c44e40c5.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_backup_plan_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_backup", "method": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", "service": { @@ -5390,14 +3507,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", + "resultType": "google.api_core.operation_async.AsyncOperation", "shortName": "update_backup" }, "description": "Sample for UpdateBackup", - "file": "gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py", + "file": "gkebackup_v1_generated_backup_for_gke_update_backup_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_async", "segments": [ { "end": 58, @@ -5430,33 +3547,32 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_backup_sync_701ec3bb.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_backup_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", - "shortName": "BackupForGKEAsyncClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", + "shortName": "BackupForGKEClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_restore_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_backup", "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestorePlan", + "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", "service": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE", "shortName": "BackupForGKE" }, - "shortName": "UpdateRestorePlan" + "shortName": "UpdateBackup" }, "parameters": [ { "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateRestorePlanRequest" + "type": "google.cloud.gke_backup_v1.types.UpdateBackupRequest" }, { - "name": "restore_plan", - "type": "google.cloud.gke_backup_v1.types.RestorePlan" + "name": "backup", + "type": "google.cloud.gke_backup_v1.types.Backup" }, { "name": "update_mask", @@ -5475,22 +3591,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "update_restore_plan" + "resultType": "google.api_core.operation.Operation", + "shortName": "update_backup" }, - "description": "Sample for UpdateRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py", + "description": "Sample for UpdateBackup", + "file": "gkebackup_v1_generated_backup_for_gke_update_backup_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_async", + "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync", "segments": [ { - "end": 60, + "end": 58, "start": 27, "type": "FULL" }, { - "end": 60, + "end": 58, "start": 27, "type": "SHORT" }, @@ -5500,31 +3616,32 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 50, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 57, - "start": 51, + "end": 55, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 61, - "start": 58, + "end": 59, + "start": 56, "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_backup_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient", + "shortName": "BackupForGKEAsyncClient" }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_restore_plan", + "fullName": "google.cloud.gke_backup_v1.BackupForGKEAsyncClient.update_restore_plan", "method": { "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestorePlan", "service": { @@ -5559,14 +3676,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", + "resultType": "google.api_core.operation_async.AsyncOperation", "shortName": "update_restore_plan" }, "description": "Sample for UpdateRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py", + "file": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync", + "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_async", "segments": [ { "end": 60, @@ -5599,7 +3716,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_a36705f8.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py" }, { "canonical": true, @@ -5647,7 +3764,7 @@ "shortName": "update_restore_plan" }, "description": "Sample for UpdateRestorePlan", - "file": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py", + "file": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync", @@ -5683,7 +3800,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync_b115a29d.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_restore_plan_sync.py" }, { "canonical": true, @@ -5816,91 +3933,7 @@ "shortName": "update_restore" }, "description": "Sample for UpdateRestore", - "file": "gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestore_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": "gkebackup_v1_generated_backup_for_gke_update_restore_sync_01ce4e95.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient", - "shortName": "BackupForGKEClient" - }, - "fullName": "google.cloud.gke_backup_v1.BackupForGKEClient.update_restore", - "method": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestore", - "service": { - "fullName": "google.cloud.gkebackup.v1.BackupForGKE", - "shortName": "BackupForGKE" - }, - "shortName": "UpdateRestore" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.gke_backup_v1.types.UpdateRestoreRequest" - }, - { - "name": "restore", - "type": "google.cloud.gke_backup_v1.types.Restore" - }, - { - "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_restore" - }, - "description": "Sample for UpdateRestore", - "file": "gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py", + "file": "gkebackup_v1_generated_backup_for_gke_update_restore_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync", @@ -5936,7 +3969,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "gkebackup_v1_generated_backup_for_gke_update_restore_sync_f27381f8.py" + "title": "gkebackup_v1_generated_backup_for_gke_update_restore_sync.py" } ] } diff --git a/packages/google-cloud-gke-backup/setup.py b/packages/google-cloud-gke-backup/setup.py index 66c57b81d7bb..8aa6b3cb5043 100644 --- a/packages/google-cloud-gke-backup/setup.py +++ b/packages/google-cloud-gke-backup/setup.py @@ -1,28 +1,40 @@ # -*- coding: utf-8 -*- -# -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +# import io import os -import setuptools +import setuptools # type: ignore + +package_root = os.path.abspath(os.path.dirname(__file__)) name = "google-cloud-gke-backup" -description = "Backup for GKE API client library" -version = "0.2.2" -release_status = "Development Status :: 4 - Beta" + + +description = "Google Cloud Gke Backup API client library" + +version = {} +with open(os.path.join(package_root, "google/cloud/gke_backup/gapic_version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + dependencies = [ "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", "proto-plus >= 1.22.0, <2.0.0dev", @@ -46,7 +58,6 @@ if "google.cloud" in packages: namespaces.append("google.cloud") - setuptools.setup( name=name, version=version, diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.10.txt b/packages/google-cloud-gke-backup/testing/constraints-3.10.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-gke-backup/testing/constraints-3.10.txt +++ b/packages/google-cloud-gke-backup/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.11.txt b/packages/google-cloud-gke-backup/testing/constraints-3.11.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-gke-backup/testing/constraints-3.11.txt +++ b/packages/google-cloud-gke-backup/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.8.txt b/packages/google-cloud-gke-backup/testing/constraints-3.8.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-gke-backup/testing/constraints-3.8.txt +++ b/packages/google-cloud-gke-backup/testing/constraints-3.8.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.9.txt b/packages/google-cloud-gke-backup/testing/constraints-3.9.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-gke-backup/testing/constraints-3.9.txt +++ b/packages/google-cloud-gke-backup/testing/constraints-3.9.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py b/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py index a44bb9a611a4..0b3f6d1ab202 100644 --- a/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py +++ b/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py @@ -22,52 +22,55 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + operation, + operations_v1, + path_template, +) from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import operation from google.api_core import operation_async # type: ignore -from google.api_core import operations_v1 -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.gke_backup_v1.services.backup_for_gke import BackupForGKEAsyncClient -from google.cloud.gke_backup_v1.services.backup_for_gke import BackupForGKEClient -from google.cloud.gke_backup_v1.services.backup_for_gke import pagers -from google.cloud.gke_backup_v1.services.backup_for_gke import transports +from google.longrunning import operations_pb2 +from google.oauth2 import service_account +from google.protobuf import empty_pb2 # type: ignore +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import json_format +from google.protobuf import timestamp_pb2 # type: ignore +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +from google.cloud.gke_backup_v1.services.backup_for_gke import ( + BackupForGKEAsyncClient, + BackupForGKEClient, + pagers, + transports, +) from google.cloud.gke_backup_v1.types import backup from google.cloud.gke_backup_v1.types import backup as gcg_backup from google.cloud.gke_backup_v1.types import backup_plan from google.cloud.gke_backup_v1.types import backup_plan as gcg_backup_plan -from google.cloud.gke_backup_v1.types import common -from google.cloud.gke_backup_v1.types import gkebackup +from google.cloud.gke_backup_v1.types import common, gkebackup from google.cloud.gke_backup_v1.types import restore from google.cloud.gke_backup_v1.types import restore as gcg_restore from google.cloud.gke_backup_v1.types import restore_plan from google.cloud.gke_backup_v1.types import restore_plan as gcg_restore_plan from google.cloud.gke_backup_v1.types import volume -from google.longrunning import operations_pb2 -from google.oauth2 import service_account -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore -import google.auth def client_cert_source_callback():