diff --git a/packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py b/packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py index a6ccd663d16f..30274cc6e9dd 100644 --- a/packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py +++ b/packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/gapic_version.py b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/gapic_version.py index a6ccd663d16f..30274cc6e9dd 100644 --- a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/gapic_version.py +++ b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/discuss_service/async_client.py b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/discuss_service/async_client.py index 36ac386630ef..6f38823a6a66 100644 --- a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/discuss_service/async_client.py +++ b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/discuss_service/async_client.py @@ -528,7 +528,7 @@ async def sample_count_message_tokens(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DiscussServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/model_service/async_client.py b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/model_service/async_client.py index 08d1920feb55..8b07663be220 100644 --- a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/model_service/async_client.py +++ b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/model_service/async_client.py @@ -446,7 +446,7 @@ async def sample_list_models(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ModelServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/text_service/async_client.py b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/text_service/async_client.py index e41dcaebb258..27f3f6072abf 100644 --- a/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/text_service/async_client.py +++ b/packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/services/text_service/async_client.py @@ -537,7 +537,7 @@ async def sample_embed_text(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TextServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-ai-generativelanguage/samples/generated_samples/snippet_metadata_google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated_samples/snippet_metadata_google.ai.generativelanguage.v1beta2.json index 6378346670f4..5b7d0a0509b4 100644 --- a/packages/google-ai-generativelanguage/samples/generated_samples/snippet_metadata_google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated_samples/snippet_metadata_google.ai.generativelanguage.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-ai-generativelanguage", - "version": "0.3.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-ai-generativelanguage/tests/unit/gapic/generativelanguage_v1beta2/test_model_service.py b/packages/google-ai-generativelanguage/tests/unit/gapic/generativelanguage_v1beta2/test_model_service.py index fd9ad7c169ab..7a3f54aeffcf 100644 --- a/packages/google-ai-generativelanguage/tests/unit/gapic/generativelanguage_v1beta2/test_model_service.py +++ b/packages/google-ai-generativelanguage/tests/unit/gapic/generativelanguage_v1beta2/test_model_service.py @@ -1319,9 +1319,11 @@ async def test_list_models_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_models(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-apps-script-type/CONTRIBUTING.rst b/packages/google-apps-script-type/CONTRIBUTING.rst index 78b7f269205d..820dac7ea427 100644 --- a/packages/google-apps-script-type/CONTRIBUTING.rst +++ b/packages/google-apps-script-type/CONTRIBUTING.rst @@ -239,18 +239,6 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. -Reasons for this include: - -- Encouraging use of newest versions of Python 3 -- Taking the lead of `prominent`_ open-source `projects`_ -- `Unicode literal support`_ which allows for a cleaner codebase that - works in both Python 2 and Python 3 - -.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django -.. _projects: http://flask.pocoo.org/docs/0.10/python3/ -.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ - ********** Versioning ********** diff --git a/packages/google-apps-script-type/google/apps/script/type/calendar/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/calendar/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/calendar/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/calendar/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/docs/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/docs/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/docs/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/docs/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/drive/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/drive/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/drive/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/drive/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/gmail/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/gmail/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/gmail/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/gmail/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/sheets/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/sheets/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/sheets/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/sheets/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/google/apps/script/type/slides/gapic_version.py b/packages/google-apps-script-type/google/apps/script/type/slides/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-apps-script-type/google/apps/script/type/slides/gapic_version.py +++ b/packages/google-apps-script-type/google/apps/script/type/slides/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.3.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-script-type/noxfile.py b/packages/google-apps-script-type/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-apps-script-type/noxfile.py +++ b/packages/google-apps-script-type/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-apps-script-type/testing/constraints-3.10.txt b/packages/google-apps-script-type/testing/constraints-3.10.txt index ed7f9aed2559..3a9e27b606ec 100644 --- a/packages/google-apps-script-type/testing/constraints-3.10.txt +++ b/packages/google-apps-script-type/testing/constraints-3.10.txt @@ -4,3 +4,4 @@ google-api-core proto-plus protobuf +google-apps-script-type diff --git a/packages/google-apps-script-type/testing/constraints-3.11.txt b/packages/google-apps-script-type/testing/constraints-3.11.txt index ed7f9aed2559..3a9e27b606ec 100644 --- a/packages/google-apps-script-type/testing/constraints-3.11.txt +++ b/packages/google-apps-script-type/testing/constraints-3.11.txt @@ -4,3 +4,4 @@ google-api-core proto-plus protobuf +google-apps-script-type diff --git a/packages/google-apps-script-type/testing/constraints-3.12.txt b/packages/google-apps-script-type/testing/constraints-3.12.txt index ed7f9aed2559..3a9e27b606ec 100644 --- a/packages/google-apps-script-type/testing/constraints-3.12.txt +++ b/packages/google-apps-script-type/testing/constraints-3.12.txt @@ -4,3 +4,4 @@ google-api-core proto-plus protobuf +google-apps-script-type diff --git a/packages/google-apps-script-type/testing/constraints-3.8.txt b/packages/google-apps-script-type/testing/constraints-3.8.txt index ed7f9aed2559..3a9e27b606ec 100644 --- a/packages/google-apps-script-type/testing/constraints-3.8.txt +++ b/packages/google-apps-script-type/testing/constraints-3.8.txt @@ -4,3 +4,4 @@ google-api-core proto-plus protobuf +google-apps-script-type diff --git a/packages/google-apps-script-type/testing/constraints-3.9.txt b/packages/google-apps-script-type/testing/constraints-3.9.txt index ed7f9aed2559..3a9e27b606ec 100644 --- a/packages/google-apps-script-type/testing/constraints-3.9.txt +++ b/packages/google-apps-script-type/testing/constraints-3.9.txt @@ -4,3 +4,4 @@ google-api-core proto-plus protobuf +google-apps-script-type diff --git a/packages/google-area120-tables/google/area120/tables/gapic_version.py b/packages/google-area120-tables/google/area120/tables/gapic_version.py index d8ae9e009f6a..30274cc6e9dd 100644 --- a/packages/google-area120-tables/google/area120/tables/gapic_version.py +++ b/packages/google-area120-tables/google/area120/tables/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.11.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-area120-tables/google/area120/tables_v1alpha1/gapic_version.py b/packages/google-area120-tables/google/area120/tables_v1alpha1/gapic_version.py index d8ae9e009f6a..30274cc6e9dd 100644 --- a/packages/google-area120-tables/google/area120/tables_v1alpha1/gapic_version.py +++ b/packages/google-area120-tables/google/area120/tables_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.11.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/async_client.py b/packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/async_client.py index 91d815e90ff5..67578e84c0a2 100644 --- a/packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/async_client.py +++ b/packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/async_client.py @@ -1364,7 +1364,7 @@ async def sample_batch_delete_rows(): metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "TablesServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-area120-tables/noxfile.py b/packages/google-area120-tables/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-area120-tables/noxfile.py +++ b/packages/google-area120-tables/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_async.py new file mode 100644 index 000000000000..6b9ad4cd5cc4 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchCreateRows_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_batch_create_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + requests = tables_v1alpha1.CreateRowRequest() + requests.parent = "parent_value" + + request = tables_v1alpha1.BatchCreateRowsRequest( + parent="parent_value", + requests=requests, + ) + + # Make the request + response = await client.batch_create_rows(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_BatchCreateRows_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync.py new file mode 100644 index 000000000000..3bc0ae3dad8c --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_batch_create_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + requests = tables_v1alpha1.CreateRowRequest() + requests.parent = "parent_value" + + request = tables_v1alpha1.BatchCreateRowsRequest( + parent="parent_value", + requests=requests, + ) + + # Make the request + response = client.batch_create_rows(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_async.py new file mode 100644 index 000000000000..0f1116cce446 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchDeleteRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_batch_delete_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.BatchDeleteRowsRequest( + parent="parent_value", + names=['names_value1', 'names_value2'], + ) + + # Make the request + await client.batch_delete_rows(request=request) + + +# [END area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync.py new file mode 100644 index 000000000000..da78952f0ad9 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchDeleteRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_batch_delete_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.BatchDeleteRowsRequest( + parent="parent_value", + names=['names_value1', 'names_value2'], + ) + + # Make the request + client.batch_delete_rows(request=request) + + +# [END area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_async.py new file mode 100644 index 000000000000..37f11bb6db32 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchUpdateRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_batch_update_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.BatchUpdateRowsRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_update_rows(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync.py new file mode 100644 index 000000000000..e46aadb106f3 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchUpdateRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_batch_update_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.BatchUpdateRowsRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_update_rows(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_async.py new file mode 100644 index 000000000000..ff77e3b7f1c8 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_CreateRow_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_create_row(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.CreateRowRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_CreateRow_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_sync.py new file mode 100644 index 000000000000..d81bf493cb6f --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_create_row_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_CreateRow_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_create_row(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.CreateRowRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_CreateRow_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_async.py new file mode 100644 index 000000000000..efa930dbb95e --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_DeleteRow_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_delete_row(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.DeleteRowRequest( + name="name_value", + ) + + # Make the request + await client.delete_row(request=request) + + +# [END area120tables_v1alpha1_generated_TablesService_DeleteRow_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_sync.py new file mode 100644 index 000000000000..a34a29c828e7 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_delete_row_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_DeleteRow_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_delete_row(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.DeleteRowRequest( + name="name_value", + ) + + # Make the request + client.delete_row(request=request) + + +# [END area120tables_v1alpha1_generated_TablesService_DeleteRow_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_async.py new file mode 100644 index 000000000000..4f1f722bfdb7 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetRow_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_get_row(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetRowRequest( + name="name_value", + ) + + # Make the request + response = await client.get_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetRow_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_sync.py new file mode 100644 index 000000000000..cfe48ec3b1d8 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_row_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetRow_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_get_row(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetRowRequest( + name="name_value", + ) + + # Make the request + response = client.get_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetRow_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_async.py new file mode 100644 index 000000000000..6541ce0f80b0 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetTable_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_get_table(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetTableRequest( + name="name_value", + ) + + # Make the request + response = await client.get_table(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetTable_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_sync.py new file mode 100644 index 000000000000..d8a25deded4e --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_table_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetTable_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_get_table(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetTableRequest( + name="name_value", + ) + + # Make the request + response = client.get_table(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetTable_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_async.py new file mode 100644 index 000000000000..cc40a0e73e7c --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_get_workspace(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetWorkspaceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_workspace(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetWorkspace_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_sync.py new file mode 100644 index 000000000000..4c78f552a37f --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_get_workspace_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_GetWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_get_workspace(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.GetWorkspaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_workspace(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_GetWorkspace_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_async.py new file mode 100644 index 000000000000..8a90058f7b14 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListRows_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_list_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListRowsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_rows(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListRows_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_sync.py new file mode 100644 index 000000000000..e3f48535f491 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_rows_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRows +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListRows_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_list_rows(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListRowsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_rows(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListRows_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_async.py new file mode 100644 index 000000000000..30c26c0786d1 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTables +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListTables_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_list_tables(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListTablesRequest( + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListTables_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_sync.py new file mode 100644 index 000000000000..f60d4da24861 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTables +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListTables_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_list_tables(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListTablesRequest( + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListTables_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_async.py new file mode 100644 index 000000000000..e6ec2e86a1af --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListWorkspaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListWorkspaces_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_list_workspaces(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListWorkspacesRequest( + ) + + # Make the request + page_result = client.list_workspaces(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListWorkspaces_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_sync.py new file mode 100644 index 000000000000..6d71814745d7 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_workspaces_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListWorkspaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_ListWorkspaces_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_list_workspaces(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.ListWorkspacesRequest( + ) + + # Make the request + page_result = client.list_workspaces(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_ListWorkspaces_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_async.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_async.py new file mode 100644 index 000000000000..3e9871df81b4 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_UpdateRow_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +async def sample_update_row(): + # Create a client + client = tables_v1alpha1.TablesServiceAsyncClient() + + # Initialize request argument(s) + request = tables_v1alpha1.UpdateRowRequest( + ) + + # Make the request + response = await client.update_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_UpdateRow_async] diff --git a/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_sync.py b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_sync.py new file mode 100644 index 000000000000..95212ab7c2c6 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_update_row_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRow +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-area120-tables + + +# [START area120tables_v1alpha1_generated_TablesService_UpdateRow_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.area120 import tables_v1alpha1 + + +def sample_update_row(): + # Create a client + client = tables_v1alpha1.TablesServiceClient() + + # Initialize request argument(s) + request = tables_v1alpha1.UpdateRowRequest( + ) + + # Make the request + response = client.update_row(request=request) + + # Handle the response + print(response) + +# [END area120tables_v1alpha1_generated_TablesService_UpdateRow_sync] diff --git a/packages/google-area120-tables/samples/generated_samples/snippet_metadata_google.area120.tables.v1alpha1.json b/packages/google-area120-tables/samples/generated_samples/snippet_metadata_google.area120.tables.v1alpha1.json new file mode 100644 index 000000000000..fdfb568d52d6 --- /dev/null +++ b/packages/google-area120-tables/samples/generated_samples/snippet_metadata_google.area120.tables.v1alpha1.json @@ -0,0 +1,1911 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.area120.tables.v1alpha1", + "version": "v1alpha1" + } + ], + "language": "PYTHON", + "name": "google-area120-tables", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.batch_create_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchCreateRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchCreateRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchCreateRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.BatchCreateRowsResponse", + "shortName": "batch_create_rows" + }, + "description": "Sample for BatchCreateRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_create_rows_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchCreateRows_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_batch_create_rows_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.batch_create_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchCreateRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchCreateRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchCreateRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.BatchCreateRowsResponse", + "shortName": "batch_create_rows" + }, + "description": "Sample for BatchCreateRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.batch_delete_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchDeleteRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchDeleteRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchDeleteRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "batch_delete_rows" + }, + "description": "Sample for BatchDeleteRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_delete_rows_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_batch_delete_rows_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.batch_delete_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchDeleteRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchDeleteRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchDeleteRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "batch_delete_rows" + }, + "description": "Sample for BatchDeleteRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.batch_update_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchUpdateRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchUpdateRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchUpdateRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.BatchUpdateRowsResponse", + "shortName": "batch_update_rows" + }, + "description": "Sample for BatchUpdateRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_update_rows_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_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": "area120tables_v1alpha1_generated_tables_service_batch_update_rows_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.batch_update_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.BatchUpdateRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "BatchUpdateRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.BatchUpdateRowsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.BatchUpdateRowsResponse", + "shortName": "batch_update_rows" + }, + "description": "Sample for BatchUpdateRows", + "file": "area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_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": "area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.create_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.CreateRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "CreateRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.CreateRowRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "row", + "type": "google.area120.tables_v1alpha1.types.Row" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.Row", + "shortName": "create_row" + }, + "description": "Sample for CreateRow", + "file": "area120tables_v1alpha1_generated_tables_service_create_row_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_CreateRow_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": "area120tables_v1alpha1_generated_tables_service_create_row_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.create_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.CreateRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "CreateRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.CreateRowRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "row", + "type": "google.area120.tables_v1alpha1.types.Row" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.types.Row", + "shortName": "create_row" + }, + "description": "Sample for CreateRow", + "file": "area120tables_v1alpha1_generated_tables_service_create_row_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_CreateRow_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": "area120tables_v1alpha1_generated_tables_service_create_row_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.delete_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.DeleteRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "DeleteRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.DeleteRowRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_row" + }, + "description": "Sample for DeleteRow", + "file": "area120tables_v1alpha1_generated_tables_service_delete_row_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_DeleteRow_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_delete_row_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.delete_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.DeleteRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "DeleteRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.DeleteRowRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_row" + }, + "description": "Sample for DeleteRow", + "file": "area120tables_v1alpha1_generated_tables_service_delete_row_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_DeleteRow_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_delete_row_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.get_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetRowRequest" + }, + { + "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.area120.tables_v1alpha1.types.Row", + "shortName": "get_row" + }, + "description": "Sample for GetRow", + "file": "area120tables_v1alpha1_generated_tables_service_get_row_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetRow_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": "area120tables_v1alpha1_generated_tables_service_get_row_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.get_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetRowRequest" + }, + { + "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.area120.tables_v1alpha1.types.Row", + "shortName": "get_row" + }, + "description": "Sample for GetRow", + "file": "area120tables_v1alpha1_generated_tables_service_get_row_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetRow_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": "area120tables_v1alpha1_generated_tables_service_get_row_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.get_table", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetTable", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetTableRequest" + }, + { + "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.area120.tables_v1alpha1.types.Table", + "shortName": "get_table" + }, + "description": "Sample for GetTable", + "file": "area120tables_v1alpha1_generated_tables_service_get_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetTable_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": "area120tables_v1alpha1_generated_tables_service_get_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.get_table", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetTable", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetTableRequest" + }, + { + "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.area120.tables_v1alpha1.types.Table", + "shortName": "get_table" + }, + "description": "Sample for GetTable", + "file": "area120tables_v1alpha1_generated_tables_service_get_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetTable_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": "area120tables_v1alpha1_generated_tables_service_get_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.get_workspace", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetWorkspace", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetWorkspaceRequest" + }, + { + "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.area120.tables_v1alpha1.types.Workspace", + "shortName": "get_workspace" + }, + "description": "Sample for GetWorkspace", + "file": "area120tables_v1alpha1_generated_tables_service_get_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetWorkspace_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": "area120tables_v1alpha1_generated_tables_service_get_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.get_workspace", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.GetWorkspace", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "GetWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.GetWorkspaceRequest" + }, + { + "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.area120.tables_v1alpha1.types.Workspace", + "shortName": "get_workspace" + }, + "description": "Sample for GetWorkspace", + "file": "area120tables_v1alpha1_generated_tables_service_get_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_GetWorkspace_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": "area120tables_v1alpha1_generated_tables_service_get_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.list_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListRowsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListRowsAsyncPager", + "shortName": "list_rows" + }, + "description": "Sample for ListRows", + "file": "area120tables_v1alpha1_generated_tables_service_list_rows_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListRows_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_rows_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.list_rows", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListRows", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListRows" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListRowsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListRowsPager", + "shortName": "list_rows" + }, + "description": "Sample for ListRows", + "file": "area120tables_v1alpha1_generated_tables_service_list_rows_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListRows_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_rows_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.list_tables", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListTables", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListTables" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListTablesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListTablesAsyncPager", + "shortName": "list_tables" + }, + "description": "Sample for ListTables", + "file": "area120tables_v1alpha1_generated_tables_service_list_tables_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListTables_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_tables_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.list_tables", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListTables", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListTables" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListTablesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListTablesPager", + "shortName": "list_tables" + }, + "description": "Sample for ListTables", + "file": "area120tables_v1alpha1_generated_tables_service_list_tables_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListTables_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_tables_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.list_workspaces", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListWorkspaces", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListWorkspaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListWorkspacesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListWorkspacesAsyncPager", + "shortName": "list_workspaces" + }, + "description": "Sample for ListWorkspaces", + "file": "area120tables_v1alpha1_generated_tables_service_list_workspaces_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListWorkspaces_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_workspaces_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.list_workspaces", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.ListWorkspaces", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "ListWorkspaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.ListWorkspacesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.area120.tables_v1alpha1.services.tables_service.pagers.ListWorkspacesPager", + "shortName": "list_workspaces" + }, + "description": "Sample for ListWorkspaces", + "file": "area120tables_v1alpha1_generated_tables_service_list_workspaces_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_ListWorkspaces_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_list_workspaces_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient", + "shortName": "TablesServiceAsyncClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceAsyncClient.update_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.UpdateRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "UpdateRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.UpdateRowRequest" + }, + { + "name": "row", + "type": "google.area120.tables_v1alpha1.types.Row" + }, + { + "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.area120.tables_v1alpha1.types.Row", + "shortName": "update_row" + }, + "description": "Sample for UpdateRow", + "file": "area120tables_v1alpha1_generated_tables_service_update_row_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_UpdateRow_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_update_row_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient", + "shortName": "TablesServiceClient" + }, + "fullName": "google.area120.tables_v1alpha1.TablesServiceClient.update_row", + "method": { + "fullName": "google.area120.tables.v1alpha1.TablesService.UpdateRow", + "service": { + "fullName": "google.area120.tables.v1alpha1.TablesService", + "shortName": "TablesService" + }, + "shortName": "UpdateRow" + }, + "parameters": [ + { + "name": "request", + "type": "google.area120.tables_v1alpha1.types.UpdateRowRequest" + }, + { + "name": "row", + "type": "google.area120.tables_v1alpha1.types.Row" + }, + { + "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.area120.tables_v1alpha1.types.Row", + "shortName": "update_row" + }, + "description": "Sample for UpdateRow", + "file": "area120tables_v1alpha1_generated_tables_service_update_row_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "area120tables_v1alpha1_generated_TablesService_UpdateRow_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "area120tables_v1alpha1_generated_tables_service_update_row_sync.py" + } + ] +} diff --git a/packages/google-area120-tables/tests/unit/gapic/tables_v1alpha1/test_tables_service.py b/packages/google-area120-tables/tests/unit/gapic/tables_v1alpha1/test_tables_service.py index ba6cf4acf16f..aded3254c1b9 100644 --- a/packages/google-area120-tables/tests/unit/gapic/tables_v1alpha1/test_tables_service.py +++ b/packages/google-area120-tables/tests/unit/gapic/tables_v1alpha1/test_tables_service.py @@ -1209,9 +1209,11 @@ async def test_list_tables_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tables(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1715,9 +1717,11 @@ async def test_list_workspaces_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_workspaces(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2363,9 +2367,11 @@ async def test_list_rows_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_rows(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-access-approval/google/cloud/accessapproval/gapic_version.py b/packages/google-cloud-access-approval/google/cloud/accessapproval/gapic_version.py index a034d27a388b..30274cc6e9dd 100644 --- a/packages/google-cloud-access-approval/google/cloud/accessapproval/gapic_version.py +++ b/packages/google-cloud-access-approval/google/cloud/accessapproval/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/gapic_version.py b/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/gapic_version.py index a034d27a388b..30274cc6e9dd 100644 --- a/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/gapic_version.py +++ b/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/async_client.py b/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/async_client.py index 3da2d4add358..378644cfeefe 100644 --- a/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/async_client.py +++ b/packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/async_client.py @@ -1214,7 +1214,7 @@ async def sample_get_access_approval_service_account(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AccessApprovalAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-access-approval/noxfile.py b/packages/google-cloud-access-approval/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-access-approval/noxfile.py +++ b/packages/google-cloud-access-approval/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_async.py new file mode 100644 index 000000000000..83bee44aa86d --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ApproveApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_approve_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.ApproveApprovalRequestMessage( + ) + + # Make the request + response = await client.approve_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_sync.py new file mode 100644 index 000000000000..fc3cbae08233 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_approve_approval_request_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ApproveApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_approve_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.ApproveApprovalRequestMessage( + ) + + # Make the request + response = client.approve_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_async.py new file mode 100644 index 000000000000..344d1390da29 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_delete_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.DeleteAccessApprovalSettingsMessage( + ) + + # Make the request + await client.delete_access_approval_settings(request=request) + + +# [END accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_sync.py new file mode 100644 index 000000000000..32767157e95b --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_delete_access_approval_settings_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_delete_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.DeleteAccessApprovalSettingsMessage( + ) + + # Make the request + client.delete_access_approval_settings(request=request) + + +# [END accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_async.py new file mode 100644 index 000000000000..26525cbf298e --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DismissApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_dismiss_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.DismissApprovalRequestMessage( + ) + + # Make the request + response = await client.dismiss_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_sync.py new file mode 100644 index 000000000000..68c602065655 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_dismiss_approval_request_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DismissApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_dismiss_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.DismissApprovalRequestMessage( + ) + + # Make the request + response = client.dismiss_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_async.py new file mode 100644 index 000000000000..cebba61c39e8 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAccessApprovalServiceAccount +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_get_access_approval_service_account(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetAccessApprovalServiceAccountMessage( + ) + + # Make the request + response = await client.get_access_approval_service_account(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_sync.py new file mode 100644 index 000000000000..e2c2bbe4e478 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_service_account_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAccessApprovalServiceAccount +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_get_access_approval_service_account(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetAccessApprovalServiceAccountMessage( + ) + + # Make the request + response = client.get_access_approval_service_account(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_async.py new file mode 100644 index 000000000000..62a90d6b41eb --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_get_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetAccessApprovalSettingsMessage( + ) + + # Make the request + response = await client.get_access_approval_settings(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_sync.py new file mode 100644 index 000000000000..01c4b75d7221 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_access_approval_settings_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_get_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetAccessApprovalSettingsMessage( + ) + + # Make the request + response = client.get_access_approval_settings(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_async.py new file mode 100644 index 000000000000..831e82702f3b --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetApprovalRequest_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_get_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetApprovalRequestMessage( + ) + + # Make the request + response = await client.get_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetApprovalRequest_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_sync.py new file mode 100644 index 000000000000..a44b1223d101 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_get_approval_request_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_GetApprovalRequest_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_get_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.GetApprovalRequestMessage( + ) + + # Make the request + response = client.get_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_GetApprovalRequest_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_async.py new file mode 100644 index 000000000000..61499f2866c7 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for InvalidateApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_invalidate_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.InvalidateApprovalRequestMessage( + ) + + # Make the request + response = await client.invalidate_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_sync.py new file mode 100644 index 000000000000..d0ceb734ecec --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_invalidate_approval_request_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for InvalidateApprovalRequest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_invalidate_approval_request(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.InvalidateApprovalRequestMessage( + ) + + # Make the request + response = client.invalidate_approval_request(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_async.py new file mode 100644 index 000000000000..04228ef47f10 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApprovalRequests +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_ListApprovalRequests_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_list_approval_requests(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.ListApprovalRequestsMessage( + ) + + # Make the request + page_result = client.list_approval_requests(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END accessapproval_v1_generated_AccessApproval_ListApprovalRequests_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_sync.py new file mode 100644 index 000000000000..88050532ceaf --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_list_approval_requests_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApprovalRequests +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_ListApprovalRequests_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_list_approval_requests(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.ListApprovalRequestsMessage( + ) + + # Make the request + page_result = client.list_approval_requests(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END accessapproval_v1_generated_AccessApproval_ListApprovalRequests_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_async.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_async.py new file mode 100644 index 000000000000..b9e33dbbe3a8 --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +async def sample_update_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalAsyncClient() + + # Initialize request argument(s) + request = accessapproval_v1.UpdateAccessApprovalSettingsMessage( + ) + + # Make the request + response = await client.update_access_approval_settings(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_async] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_sync.py b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_sync.py new file mode 100644 index 000000000000..2613bdcc87ae --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/accessapproval_v1_generated_access_approval_update_access_approval_settings_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAccessApprovalSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-access-approval + + +# [START accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import accessapproval_v1 + + +def sample_update_access_approval_settings(): + # Create a client + client = accessapproval_v1.AccessApprovalClient() + + # Initialize request argument(s) + request = accessapproval_v1.UpdateAccessApprovalSettingsMessage( + ) + + # Make the request + response = client.update_access_approval_settings(request=request) + + # Handle the response + print(response) + +# [END accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_sync] diff --git a/packages/google-cloud-access-approval/samples/generated_samples/snippet_metadata_google.cloud.accessapproval.v1.json b/packages/google-cloud-access-approval/samples/generated_samples/snippet_metadata_google.cloud.accessapproval.v1.json new file mode 100644 index 000000000000..b1f693e8b12f --- /dev/null +++ b/packages/google-cloud-access-approval/samples/generated_samples/snippet_metadata_google.cloud.accessapproval.v1.json @@ -0,0 +1,1442 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.accessapproval.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-access-approval", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.approve_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.ApproveApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "ApproveApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.ApproveApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "approve_approval_request" + }, + "description": "Sample for ApproveApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_approve_approval_request_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_approve_approval_request_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.approve_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.ApproveApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "ApproveApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.ApproveApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "approve_approval_request" + }, + "description": "Sample for ApproveApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_approve_approval_request_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_approve_approval_request_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.delete_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.DeleteAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "DeleteAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.DeleteAccessApprovalSettingsMessage" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_access_approval_settings" + }, + "description": "Sample for DeleteAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_delete_access_approval_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_delete_access_approval_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.delete_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.DeleteAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "DeleteAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.DeleteAccessApprovalSettingsMessage" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_access_approval_settings" + }, + "description": "Sample for DeleteAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_delete_access_approval_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_delete_access_approval_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.dismiss_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.DismissApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "DismissApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.DismissApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "dismiss_approval_request" + }, + "description": "Sample for DismissApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_dismiss_approval_request_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_dismiss_approval_request_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.dismiss_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.DismissApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "DismissApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.DismissApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "dismiss_approval_request" + }, + "description": "Sample for DismissApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_dismiss_approval_request_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_dismiss_approval_request_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.get_access_approval_service_account", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetAccessApprovalServiceAccount", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetAccessApprovalServiceAccount" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetAccessApprovalServiceAccountMessage" + }, + { + "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.accessapproval_v1.types.AccessApprovalServiceAccount", + "shortName": "get_access_approval_service_account" + }, + "description": "Sample for GetAccessApprovalServiceAccount", + "file": "accessapproval_v1_generated_access_approval_get_access_approval_service_account_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_access_approval_service_account_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.get_access_approval_service_account", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetAccessApprovalServiceAccount", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetAccessApprovalServiceAccount" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetAccessApprovalServiceAccountMessage" + }, + { + "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.accessapproval_v1.types.AccessApprovalServiceAccount", + "shortName": "get_access_approval_service_account" + }, + "description": "Sample for GetAccessApprovalServiceAccount", + "file": "accessapproval_v1_generated_access_approval_get_access_approval_service_account_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_access_approval_service_account_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.get_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetAccessApprovalSettingsMessage" + }, + { + "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.accessapproval_v1.types.AccessApprovalSettings", + "shortName": "get_access_approval_settings" + }, + "description": "Sample for GetAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_get_access_approval_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_access_approval_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.get_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetAccessApprovalSettingsMessage" + }, + { + "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.accessapproval_v1.types.AccessApprovalSettings", + "shortName": "get_access_approval_settings" + }, + "description": "Sample for GetAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_get_access_approval_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_access_approval_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.get_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetApprovalRequestMessage" + }, + { + "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.accessapproval_v1.types.ApprovalRequest", + "shortName": "get_approval_request" + }, + "description": "Sample for GetApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_get_approval_request_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetApprovalRequest_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_approval_request_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.get_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.GetApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "GetApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.GetApprovalRequestMessage" + }, + { + "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.accessapproval_v1.types.ApprovalRequest", + "shortName": "get_approval_request" + }, + "description": "Sample for GetApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_get_approval_request_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_GetApprovalRequest_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_get_approval_request_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.invalidate_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.InvalidateApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "InvalidateApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.InvalidateApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "invalidate_approval_request" + }, + "description": "Sample for InvalidateApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_invalidate_approval_request_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_invalidate_approval_request_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.invalidate_approval_request", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.InvalidateApprovalRequest", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "InvalidateApprovalRequest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.InvalidateApprovalRequestMessage" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.ApprovalRequest", + "shortName": "invalidate_approval_request" + }, + "description": "Sample for InvalidateApprovalRequest", + "file": "accessapproval_v1_generated_access_approval_invalidate_approval_request_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_InvalidateApprovalRequest_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_invalidate_approval_request_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.list_approval_requests", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.ListApprovalRequests", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "ListApprovalRequests" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.ListApprovalRequestsMessage" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.services.access_approval.pagers.ListApprovalRequestsAsyncPager", + "shortName": "list_approval_requests" + }, + "description": "Sample for ListApprovalRequests", + "file": "accessapproval_v1_generated_access_approval_list_approval_requests_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_ListApprovalRequests_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_list_approval_requests_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.list_approval_requests", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.ListApprovalRequests", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "ListApprovalRequests" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.ListApprovalRequestsMessage" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.services.access_approval.pagers.ListApprovalRequestsPager", + "shortName": "list_approval_requests" + }, + "description": "Sample for ListApprovalRequests", + "file": "accessapproval_v1_generated_access_approval_list_approval_requests_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_ListApprovalRequests_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_list_approval_requests_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient", + "shortName": "AccessApprovalAsyncClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalAsyncClient.update_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.UpdateAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "UpdateAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.UpdateAccessApprovalSettingsMessage" + }, + { + "name": "settings", + "type": "google.cloud.accessapproval_v1.types.AccessApprovalSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.AccessApprovalSettings", + "shortName": "update_access_approval_settings" + }, + "description": "Sample for UpdateAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_update_access_approval_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_update_access_approval_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient", + "shortName": "AccessApprovalClient" + }, + "fullName": "google.cloud.accessapproval_v1.AccessApprovalClient.update_access_approval_settings", + "method": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval.UpdateAccessApprovalSettings", + "service": { + "fullName": "google.cloud.accessapproval.v1.AccessApproval", + "shortName": "AccessApproval" + }, + "shortName": "UpdateAccessApprovalSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.accessapproval_v1.types.UpdateAccessApprovalSettingsMessage" + }, + { + "name": "settings", + "type": "google.cloud.accessapproval_v1.types.AccessApprovalSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.accessapproval_v1.types.AccessApprovalSettings", + "shortName": "update_access_approval_settings" + }, + "description": "Sample for UpdateAccessApprovalSettings", + "file": "accessapproval_v1_generated_access_approval_update_access_approval_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "accessapproval_v1_generated_access_approval_update_access_approval_settings_sync.py" + } + ] +} diff --git a/packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py b/packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py index 9de1010a9486..d85cc66d7950 100644 --- a/packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py +++ b/packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py @@ -1139,9 +1139,11 @@ async def test_list_approval_requests_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_approval_requests(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1172,9 +1174,6 @@ def test_get_approval_request(request_type, transport: str = "grpc"): call.return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) response = client.get_approval_request(request) @@ -1426,9 +1425,6 @@ def test_approve_approval_request(request_type, transport: str = "grpc"): call.return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) response = client.approve_approval_request(request) @@ -1594,9 +1590,6 @@ def test_dismiss_approval_request(request_type, transport: str = "grpc"): call.return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) response = client.dismiss_approval_request(request) @@ -1762,9 +1755,6 @@ def test_invalidate_approval_request(request_type, transport: str = "grpc"): call.return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) response = client.invalidate_approval_request(request) @@ -3196,9 +3186,6 @@ def test_get_approval_request_rest(request_type): return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) # Wrap the value into a proper Response obj @@ -3382,9 +3369,6 @@ def test_approve_approval_request_rest(request_type): return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) # Wrap the value into a proper Response obj @@ -3513,9 +3497,6 @@ def test_dismiss_approval_request_rest(request_type): return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) # Wrap the value into a proper Response obj @@ -3644,9 +3625,6 @@ def test_invalidate_approval_request_rest(request_type): return_value = accessapproval.ApprovalRequest( name="name_value", requested_resource_name="requested_resource_name_value", - approve=accessapproval.ApproveDecision( - approve_time=timestamp_pb2.Timestamp(seconds=751) - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-advisorynotifications/CONTRIBUTING.rst b/packages/google-cloud-advisorynotifications/CONTRIBUTING.rst index fa701a8b53de..876d85cdfe0b 100644 --- a/packages/google-cloud-advisorynotifications/CONTRIBUTING.rst +++ b/packages/google-cloud-advisorynotifications/CONTRIBUTING.rst @@ -239,18 +239,6 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. -Reasons for this include: - -- Encouraging use of newest versions of Python 3 -- Taking the lead of `prominent`_ open-source `projects`_ -- `Unicode literal support`_ which allows for a cleaner codebase that - works in both Python 2 and Python 3 - -.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django -.. _projects: http://flask.pocoo.org/docs/0.10/python3/ -.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ - ********** Versioning ********** diff --git a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications/gapic_version.py b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications/gapic_version.py index e94c45aea923..30274cc6e9dd 100644 --- a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications/gapic_version.py +++ b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/gapic_version.py b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/gapic_version.py index e94c45aea923..30274cc6e9dd 100644 --- a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/gapic_version.py +++ b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/gapic_version.py @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/async_client.py b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/async_client.py index b181c6896983..fdf826bcba37 100644 --- a/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/async_client.py +++ b/packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/async_client.py @@ -467,7 +467,7 @@ async def sample_get_notification(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AdvisoryNotificationsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-advisorynotifications/noxfile.py b/packages/google-cloud-advisorynotifications/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-advisorynotifications/noxfile.py +++ b/packages/google-cloud-advisorynotifications/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-advisorynotifications/samples/generated_samples/snippet_metadata_google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated_samples/snippet_metadata_google.cloud.advisorynotifications.v1.json index ec626340f4aa..77e960d626b1 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated_samples/snippet_metadata_google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated_samples/snippet_metadata_google.cloud.advisorynotifications.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-advisorynotifications", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-advisorynotifications/tests/unit/gapic/advisorynotifications_v1/test_advisory_notifications_service.py b/packages/google-cloud-advisorynotifications/tests/unit/gapic/advisorynotifications_v1/test_advisory_notifications_service.py index fc61e01d7ca7..88aa5c714dba 100644 --- a/packages/google-cloud-advisorynotifications/tests/unit/gapic/advisorynotifications_v1/test_advisory_notifications_service.py +++ b/packages/google-cloud-advisorynotifications/tests/unit/gapic/advisorynotifications_v1/test_advisory_notifications_service.py @@ -1196,9 +1196,11 @@ async def test_list_notifications_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_notifications(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py b/packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py index b717e3ae88c9..30274cc6e9dd 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py index b717e3ae88c9..30274cc6e9dd 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py index 7edcb32f25cf..a60a44f63d33 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py @@ -4134,7 +4134,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AlloyDBAdminAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py index c355ce8b2a95..26cedec276ca 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py @@ -4296,7 +4296,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py index b717e3ae88c9..30274cc6e9dd 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py index 7746fd11d4ca..3c69a9504ad6 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py @@ -4387,7 +4387,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AlloyDBAdminAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py index c7afbeb92a8b..ba4369a7a9a0 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py @@ -4570,7 +4570,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py index b717e3ae88c9..30274cc6e9dd 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py index c878ff766993..d6f9366d97b9 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py @@ -4387,7 +4387,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AlloyDBAdminAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-alloydb/noxfile.py b/packages/google-cloud-alloydb/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-alloydb/noxfile.py +++ b/packages/google-cloud-alloydb/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1.json b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1.json index 88a61c27f658..425997888ed8 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1.json +++ b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-alloydb", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json index 12c777a583f1..53090fc16662 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-alloydb", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json index 56f97891041a..aa82cb9c4be0 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-alloydb", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py index a537f2dd9c50..672f893e1e60 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py @@ -1125,9 +1125,11 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_clusters(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1163,7 +1165,6 @@ def test_get_cluster(request_type, transport: str = "grpc"): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) response = client.get_cluster(request) @@ -3184,9 +3185,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5696,9 +5699,11 @@ async def test_list_backups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_backups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7115,9 +7120,11 @@ async def test_list_supported_database_flags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_supported_database_flags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7539,9 +7546,11 @@ async def test_list_users_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_users(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8886,7 +8895,6 @@ def test_get_cluster_rest(request_type): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py index 892d0afae300..4fd5250e4f99 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py @@ -1125,9 +1125,11 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_clusters(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1163,7 +1165,6 @@ def test_get_cluster(request_type, transport: str = "grpc"): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) response = client.get_cluster(request) @@ -3184,9 +3185,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5696,9 +5699,11 @@ async def test_list_backups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_backups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7115,9 +7120,11 @@ async def test_list_supported_database_flags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_supported_database_flags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8052,9 +8059,11 @@ async def test_list_users_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_users(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9400,7 +9409,6 @@ def test_get_cluster_rest(request_type): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py index 1509f1432ebc..955fd7c60fd8 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py @@ -1125,9 +1125,11 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_clusters(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1163,7 +1165,6 @@ def test_get_cluster(request_type, transport: str = "grpc"): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) response = client.get_cluster(request) @@ -3184,9 +3185,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5696,9 +5699,11 @@ async def test_list_backups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_backups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7115,9 +7120,11 @@ async def test_list_supported_database_flags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_supported_database_flags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8052,9 +8059,11 @@ async def test_list_users_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_users(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9400,7 +9409,6 @@ def test_get_cluster_rest(request_type): network="network_value", etag="etag_value", reconciling=True, - backup_source=resources.BackupSource(backup_uid="backup_uid_value"), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-api-gateway/google/cloud/apigateway/gapic_version.py b/packages/google-cloud-api-gateway/google/cloud/apigateway/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-api-gateway/google/cloud/apigateway/gapic_version.py +++ b/packages/google-cloud-api-gateway/google/cloud/apigateway/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/gapic_version.py b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/gapic_version.py +++ b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/async_client.py b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/async_client.py index 5d93f13347a3..a724d2af2028 100644 --- a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/async_client.py +++ b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/async_client.py @@ -2163,7 +2163,7 @@ async def sample_delete_api_config(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ApiGatewayServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-api-gateway/noxfile.py b/packages/google-cloud-api-gateway/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-api-gateway/noxfile.py +++ b/packages/google-cloud-api-gateway/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_async.py new file mode 100644 index 000000000000..8448facb72ba --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_create_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.CreateApiRequest( + parent="parent_value", + api_id="api_id_value", + ) + + # Make the request + operation = client.create_api(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateApi_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_async.py new file mode 100644 index 000000000000..2ef74cb94924 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateApiConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_create_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.CreateApiConfigRequest( + parent="parent_value", + api_config_id="api_config_id_value", + ) + + # Make the request + operation = client.create_api_config(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateApiConfig_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_sync.py new file mode 100644 index 000000000000..b743c4184a32 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_config_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateApiConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_create_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.CreateApiConfigRequest( + parent="parent_value", + api_config_id="api_config_id_value", + ) + + # Make the request + operation = client.create_api_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateApiConfig_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_sync.py new file mode 100644 index 000000000000..bcb53a4cf74e --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_api_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_create_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.CreateApiRequest( + parent="parent_value", + api_id="api_id_value", + ) + + # Make the request + operation = client.create_api(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateApi_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_async.py new file mode 100644 index 000000000000..bfa369acc7c0 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_create_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + gateway = apigateway_v1.Gateway() + gateway.api_config = "api_config_value" + + request = apigateway_v1.CreateGatewayRequest( + parent="parent_value", + gateway_id="gateway_id_value", + gateway=gateway, + ) + + # Make the request + operation = client.create_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateGateway_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_sync.py new file mode 100644 index 000000000000..30d398b19f3b --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_create_gateway_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_CreateGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_create_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + gateway = apigateway_v1.Gateway() + gateway.api_config = "api_config_value" + + request = apigateway_v1.CreateGatewayRequest( + parent="parent_value", + gateway_id="gateway_id_value", + gateway=gateway, + ) + + # Make the request + operation = client.create_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_CreateGateway_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_async.py new file mode 100644 index 000000000000..79b4f5cb8440 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_delete_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteApiRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_api(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteApi_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_async.py new file mode 100644 index 000000000000..aa86c692c082 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_delete_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteApiConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_api_config(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_sync.py new file mode 100644 index 000000000000..fe4e5e651336 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_config_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_delete_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteApiConfigRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_api_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_sync.py new file mode 100644 index 000000000000..1b5bb7851145 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_api_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_delete_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteApiRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_api(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteApi_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_async.py new file mode 100644 index 000000000000..4062ac0e61b2 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_delete_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteGateway_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_sync.py new file mode 100644 index 000000000000..0424fbfe9982 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_delete_gateway_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_DeleteGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_delete_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.DeleteGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_DeleteGateway_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_async.py new file mode 100644 index 000000000000..812bb3e75097 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_get_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.GetApiRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetApi_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_async.py new file mode 100644 index 000000000000..75ffbbad4151 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetApiConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_get_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.GetApiConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api_config(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetApiConfig_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_sync.py new file mode 100644 index 000000000000..7841499e993a --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetApiConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_get_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.GetApiConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_api_config(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetApiConfig_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_sync.py new file mode 100644 index 000000000000..81fb33c91c12 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_api_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_get_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.GetApiRequest( + name="name_value", + ) + + # Make the request + response = client.get_api(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetApi_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_async.py new file mode 100644 index 000000000000..e02814345e6a --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_get_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.GetGatewayRequest( + name="name_value", + ) + + # Make the request + response = await client.get_gateway(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetGateway_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_sync.py new file mode 100644 index 000000000000..f89ab58d543e --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_get_gateway_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_GetGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_get_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.GetGatewayRequest( + name="name_value", + ) + + # Make the request + response = client.get_gateway(request=request) + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_GetGateway_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_async.py new file mode 100644 index 000000000000..e3708965c95f --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListApiConfigs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_list_api_configs(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.ListApiConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListApiConfigs_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_sync.py new file mode 100644 index 000000000000..aad33b9484ab --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_api_configs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListApiConfigs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_list_api_configs(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.ListApiConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListApiConfigs_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_async.py new file mode 100644 index 000000000000..82c346a8d5fd --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListApis_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_list_apis(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.ListApisRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_apis(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListApis_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_sync.py new file mode 100644 index 000000000000..38dc80b0a340 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_apis_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListApis_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_list_apis(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.ListApisRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_apis(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListApis_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_async.py new file mode 100644 index 000000000000..4740b2c75305 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListGateways_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_list_gateways(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.ListGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_gateways(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListGateways_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_sync.py new file mode 100644 index 000000000000..c4af3c639be6 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_list_gateways_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_ListGateways_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_list_gateways(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.ListGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_gateways(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_ListGateways_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_async.py new file mode 100644 index 000000000000..ab297f6bd88b --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_update_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.UpdateApiRequest( + ) + + # Make the request + operation = client.update_api(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateApi_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_async.py new file mode 100644 index 000000000000..b2eb0b483d95 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_update_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + request = apigateway_v1.UpdateApiConfigRequest( + ) + + # Make the request + operation = client.update_api_config(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_sync.py new file mode 100644 index 000000000000..42547f667f84 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_config_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_update_api_config(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.UpdateApiConfigRequest( + ) + + # Make the request + operation = client.update_api_config(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_sync.py new file mode 100644 index 000000000000..f22f263ae19c --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_api_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_update_api(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + request = apigateway_v1.UpdateApiRequest( + ) + + # Make the request + operation = client.update_api(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateApi_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_async.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_async.py new file mode 100644 index 000000000000..6c1cc8851973 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +async def sample_update_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceAsyncClient() + + # Initialize request argument(s) + gateway = apigateway_v1.Gateway() + gateway.api_config = "api_config_value" + + request = apigateway_v1.UpdateGatewayRequest( + gateway=gateway, + ) + + # Make the request + operation = client.update_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateGateway_async] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_sync.py b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_sync.py new file mode 100644 index 000000000000..901df8a4125a --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/apigateway_v1_generated_api_gateway_service_update_gateway_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-gateway + + +# [START apigateway_v1_generated_ApiGatewayService_UpdateGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigateway_v1 + + +def sample_update_gateway(): + # Create a client + client = apigateway_v1.ApiGatewayServiceClient() + + # Initialize request argument(s) + gateway = apigateway_v1.Gateway() + gateway.api_config = "api_config_value" + + request = apigateway_v1.UpdateGatewayRequest( + gateway=gateway, + ) + + # Make the request + operation = client.update_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigateway_v1_generated_ApiGatewayService_UpdateGateway_sync] diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json b/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json new file mode 100644 index 000000000000..fdf981856ea3 --- /dev/null +++ b/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json @@ -0,0 +1,2502 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.apigateway.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-api-gateway", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.create_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateApiConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_config", + "type": "google.cloud.apigateway_v1.types.ApiConfig" + }, + { + "name": "api_config_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_api_config" + }, + "description": "Sample for CreateApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_create_api_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateApiConfig_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_create_api_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.create_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateApiConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_config", + "type": "google.cloud.apigateway_v1.types.ApiConfig" + }, + { + "name": "api_config_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_api_config" + }, + "description": "Sample for CreateApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_create_api_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateApiConfig_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_create_api_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.create_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateApiRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api", + "type": "google.cloud.apigateway_v1.types.Api" + }, + { + "name": "api_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_api" + }, + "description": "Sample for CreateApi", + "file": "apigateway_v1_generated_api_gateway_service_create_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateApi_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_create_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.create_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateApiRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api", + "type": "google.cloud.apigateway_v1.types.Api" + }, + { + "name": "api_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_api" + }, + "description": "Sample for CreateApi", + "file": "apigateway_v1_generated_api_gateway_service_create_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateApi_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_create_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.create_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "gateway", + "type": "google.cloud.apigateway_v1.types.Gateway" + }, + { + "name": "gateway_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_gateway" + }, + "description": "Sample for CreateGateway", + "file": "apigateway_v1_generated_api_gateway_service_create_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateGateway_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_create_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.create_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.CreateGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "CreateGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.CreateGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "gateway", + "type": "google.cloud.apigateway_v1.types.Gateway" + }, + { + "name": "gateway_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_gateway" + }, + "description": "Sample for CreateGateway", + "file": "apigateway_v1_generated_api_gateway_service_create_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_CreateGateway_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": "apigateway_v1_generated_api_gateway_service_create_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.delete_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteApiConfigRequest" + }, + { + "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_api_config" + }, + "description": "Sample for DeleteApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_delete_api_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_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": "apigateway_v1_generated_api_gateway_service_delete_api_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.delete_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteApiConfigRequest" + }, + { + "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_api_config" + }, + "description": "Sample for DeleteApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_delete_api_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_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": "apigateway_v1_generated_api_gateway_service_delete_api_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.delete_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteApiRequest" + }, + { + "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_api" + }, + "description": "Sample for DeleteApi", + "file": "apigateway_v1_generated_api_gateway_service_delete_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteApi_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": "apigateway_v1_generated_api_gateway_service_delete_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.delete_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteApiRequest" + }, + { + "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_api" + }, + "description": "Sample for DeleteApi", + "file": "apigateway_v1_generated_api_gateway_service_delete_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteApi_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": "apigateway_v1_generated_api_gateway_service_delete_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.delete_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteGatewayRequest" + }, + { + "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_gateway" + }, + "description": "Sample for DeleteGateway", + "file": "apigateway_v1_generated_api_gateway_service_delete_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteGateway_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": "apigateway_v1_generated_api_gateway_service_delete_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.delete_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.DeleteGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "DeleteGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.DeleteGatewayRequest" + }, + { + "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_gateway" + }, + "description": "Sample for DeleteGateway", + "file": "apigateway_v1_generated_api_gateway_service_delete_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_DeleteGateway_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": "apigateway_v1_generated_api_gateway_service_delete_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.get_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetApiConfigRequest" + }, + { + "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.apigateway_v1.types.ApiConfig", + "shortName": "get_api_config" + }, + "description": "Sample for GetApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_get_api_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetApiConfig_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": "apigateway_v1_generated_api_gateway_service_get_api_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.get_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetApiConfigRequest" + }, + { + "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.apigateway_v1.types.ApiConfig", + "shortName": "get_api_config" + }, + "description": "Sample for GetApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_get_api_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetApiConfig_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": "apigateway_v1_generated_api_gateway_service_get_api_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.get_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetApiRequest" + }, + { + "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.apigateway_v1.types.Api", + "shortName": "get_api" + }, + "description": "Sample for GetApi", + "file": "apigateway_v1_generated_api_gateway_service_get_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetApi_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": "apigateway_v1_generated_api_gateway_service_get_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.get_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetApiRequest" + }, + { + "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.apigateway_v1.types.Api", + "shortName": "get_api" + }, + "description": "Sample for GetApi", + "file": "apigateway_v1_generated_api_gateway_service_get_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetApi_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": "apigateway_v1_generated_api_gateway_service_get_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.get_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetGatewayRequest" + }, + { + "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.apigateway_v1.types.Gateway", + "shortName": "get_gateway" + }, + "description": "Sample for GetGateway", + "file": "apigateway_v1_generated_api_gateway_service_get_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetGateway_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": "apigateway_v1_generated_api_gateway_service_get_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.get_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.GetGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "GetGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.GetGatewayRequest" + }, + { + "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.apigateway_v1.types.Gateway", + "shortName": "get_gateway" + }, + "description": "Sample for GetGateway", + "file": "apigateway_v1_generated_api_gateway_service_get_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_GetGateway_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": "apigateway_v1_generated_api_gateway_service_get_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.list_api_configs", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListApiConfigs", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListApiConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListApiConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListApiConfigsAsyncPager", + "shortName": "list_api_configs" + }, + "description": "Sample for ListApiConfigs", + "file": "apigateway_v1_generated_api_gateway_service_list_api_configs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListApiConfigs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_api_configs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.list_api_configs", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListApiConfigs", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListApiConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListApiConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListApiConfigsPager", + "shortName": "list_api_configs" + }, + "description": "Sample for ListApiConfigs", + "file": "apigateway_v1_generated_api_gateway_service_list_api_configs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListApiConfigs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_api_configs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.list_apis", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListApis", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListApis" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListApisRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListApisAsyncPager", + "shortName": "list_apis" + }, + "description": "Sample for ListApis", + "file": "apigateway_v1_generated_api_gateway_service_list_apis_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListApis_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_apis_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.list_apis", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListApis", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListApis" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListApisRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListApisPager", + "shortName": "list_apis" + }, + "description": "Sample for ListApis", + "file": "apigateway_v1_generated_api_gateway_service_list_apis_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListApis_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_apis_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.list_gateways", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListGateways", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListGatewaysAsyncPager", + "shortName": "list_gateways" + }, + "description": "Sample for ListGateways", + "file": "apigateway_v1_generated_api_gateway_service_list_gateways_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListGateways_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_gateways_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.list_gateways", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.ListGateways", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "ListGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.ListGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigateway_v1.services.api_gateway_service.pagers.ListGatewaysPager", + "shortName": "list_gateways" + }, + "description": "Sample for ListGateways", + "file": "apigateway_v1_generated_api_gateway_service_list_gateways_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_ListGateways_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_list_gateways_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.update_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateApiConfigRequest" + }, + { + "name": "api_config", + "type": "google.cloud.apigateway_v1.types.ApiConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_api_config" + }, + "description": "Sample for UpdateApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_update_api_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_update_api_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.update_api_config", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateApiConfig", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateApiConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateApiConfigRequest" + }, + { + "name": "api_config", + "type": "google.cloud.apigateway_v1.types.ApiConfig" + }, + { + "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_api_config" + }, + "description": "Sample for UpdateApiConfig", + "file": "apigateway_v1_generated_api_gateway_service_update_api_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_update_api_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.update_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateApiRequest" + }, + { + "name": "api", + "type": "google.cloud.apigateway_v1.types.Api" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_api" + }, + "description": "Sample for UpdateApi", + "file": "apigateway_v1_generated_api_gateway_service_update_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateApi_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_update_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.update_api", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateApi", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateApiRequest" + }, + { + "name": "api", + "type": "google.cloud.apigateway_v1.types.Api" + }, + { + "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_api" + }, + "description": "Sample for UpdateApi", + "file": "apigateway_v1_generated_api_gateway_service_update_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateApi_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_update_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient", + "shortName": "ApiGatewayServiceAsyncClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceAsyncClient.update_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateGatewayRequest" + }, + { + "name": "gateway", + "type": "google.cloud.apigateway_v1.types.Gateway" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_gateway" + }, + "description": "Sample for UpdateGateway", + "file": "apigateway_v1_generated_api_gateway_service_update_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateGateway_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigateway_v1_generated_api_gateway_service_update_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient", + "shortName": "ApiGatewayServiceClient" + }, + "fullName": "google.cloud.apigateway_v1.ApiGatewayServiceClient.update_gateway", + "method": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService.UpdateGateway", + "service": { + "fullName": "google.cloud.apigateway.v1.ApiGatewayService", + "shortName": "ApiGatewayService" + }, + "shortName": "UpdateGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigateway_v1.types.UpdateGatewayRequest" + }, + { + "name": "gateway", + "type": "google.cloud.apigateway_v1.types.Gateway" + }, + { + "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_gateway" + }, + "description": "Sample for UpdateGateway", + "file": "apigateway_v1_generated_api_gateway_service_update_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigateway_v1_generated_ApiGatewayService_UpdateGateway_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": "apigateway_v1_generated_api_gateway_service_update_gateway_sync.py" + } + ] +} diff --git a/packages/google-cloud-api-gateway/tests/unit/gapic/apigateway_v1/test_api_gateway_service.py b/packages/google-cloud-api-gateway/tests/unit/gapic/apigateway_v1/test_api_gateway_service.py index c4c46f3ecfb0..160c96772c6d 100644 --- a/packages/google-cloud-api-gateway/tests/unit/gapic/apigateway_v1/test_api_gateway_service.py +++ b/packages/google-cloud-api-gateway/tests/unit/gapic/apigateway_v1/test_api_gateway_service.py @@ -1161,9 +1161,11 @@ async def test_list_gateways_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_gateways(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2537,9 +2539,11 @@ async def test_list_apis_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_apis(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3909,9 +3913,11 @@ async def test_list_api_configs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_configs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-api-keys/google/cloud/api_keys/gapic_version.py b/packages/google-cloud-api-keys/google/cloud/api_keys/gapic_version.py index 5c451c14e9e7..30274cc6e9dd 100644 --- a/packages/google-cloud-api-keys/google/cloud/api_keys/gapic_version.py +++ b/packages/google-cloud-api-keys/google/cloud/api_keys/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.5.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-api-keys/google/cloud/api_keys_v2/gapic_version.py b/packages/google-cloud-api-keys/google/cloud/api_keys_v2/gapic_version.py index 5c451c14e9e7..30274cc6e9dd 100644 --- a/packages/google-cloud-api-keys/google/cloud/api_keys_v2/gapic_version.py +++ b/packages/google-cloud-api-keys/google/cloud/api_keys_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.5.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-api-keys/google/cloud/api_keys_v2/services/api_keys/async_client.py b/packages/google-cloud-api-keys/google/cloud/api_keys_v2/services/api_keys/async_client.py index 4f438097268b..2028c7586ded 100644 --- a/packages/google-cloud-api-keys/google/cloud/api_keys_v2/services/api_keys/async_client.py +++ b/packages/google-cloud-api-keys/google/cloud/api_keys_v2/services/api_keys/async_client.py @@ -1168,7 +1168,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ApiKeysAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-api-keys/noxfile.py b/packages/google-cloud-api-keys/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-api-keys/noxfile.py +++ b/packages/google-cloud-api-keys/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_async.py new file mode 100644 index 000000000000..915f4b18497f --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_CreateKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_create_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.CreateKeyRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_CreateKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_sync.py new file mode 100644 index 000000000000..81d2f034bece --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_create_key_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_CreateKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_create_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.CreateKeyRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_CreateKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_async.py new file mode 100644 index 000000000000..fe92d65f66c1 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_DeleteKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_delete_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.DeleteKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_DeleteKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_sync.py new file mode 100644 index 000000000000..91503109af3f --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_delete_key_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_DeleteKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_delete_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.DeleteKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_DeleteKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_async.py new file mode 100644 index 000000000000..86484bfce7ff --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_GetKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_get_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.GetKeyRequest( + name="name_value", + ) + + # Make the request + response = await client.get_key(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_GetKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_async.py new file mode 100644 index 000000000000..85fa20ea4e1c --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetKeyString +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_GetKeyString_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_get_key_string(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.GetKeyStringRequest( + name="name_value", + ) + + # Make the request + response = await client.get_key_string(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_GetKeyString_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_sync.py new file mode 100644 index 000000000000..3f88e488e2ac --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_string_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetKeyString +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_GetKeyString_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_get_key_string(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.GetKeyStringRequest( + name="name_value", + ) + + # Make the request + response = client.get_key_string(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_GetKeyString_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_sync.py new file mode 100644 index 000000000000..6097212a88d2 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_get_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_GetKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_get_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.GetKeyRequest( + name="name_value", + ) + + # Make the request + response = client.get_key(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_GetKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_async.py new file mode 100644 index 000000000000..4e9ea736e13b --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListKeys +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_ListKeys_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_list_keys(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.ListKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_keys(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apikeys_v2_generated_ApiKeys_ListKeys_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_sync.py new file mode 100644 index 000000000000..7b7ddb2932a0 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_list_keys_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListKeys +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_ListKeys_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_list_keys(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.ListKeysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_keys(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apikeys_v2_generated_ApiKeys_ListKeys_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_async.py new file mode 100644 index 000000000000..fce000bd8e94 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for LookupKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_LookupKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_lookup_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.LookupKeyRequest( + key_string="key_string_value", + ) + + # Make the request + response = await client.lookup_key(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_LookupKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_sync.py new file mode 100644 index 000000000000..184ae1e1a3f1 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_lookup_key_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for LookupKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_LookupKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_lookup_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.LookupKeyRequest( + key_string="key_string_value", + ) + + # Make the request + response = client.lookup_key(request=request) + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_LookupKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_async.py new file mode 100644 index 000000000000..6cff5fb41049 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UndeleteKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_UndeleteKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_undelete_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.UndeleteKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_UndeleteKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_sync.py new file mode 100644 index 000000000000..12c1e0f33bf8 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_undelete_key_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UndeleteKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_UndeleteKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_undelete_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.UndeleteKeyRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_UndeleteKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_async.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_async.py new file mode 100644 index 000000000000..19c8d7f752bd --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_UpdateKey_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +async def sample_update_key(): + # Create a client + client = api_keys_v2.ApiKeysAsyncClient() + + # Initialize request argument(s) + request = api_keys_v2.UpdateKeyRequest( + ) + + # Make the request + operation = client.update_key(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_UpdateKey_async] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_sync.py b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_sync.py new file mode 100644 index 000000000000..b7016179f1ed --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/apikeys_v2_generated_api_keys_update_key_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateKey +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-api-keys + + +# [START apikeys_v2_generated_ApiKeys_UpdateKey_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import api_keys_v2 + + +def sample_update_key(): + # Create a client + client = api_keys_v2.ApiKeysClient() + + # Initialize request argument(s) + request = api_keys_v2.UpdateKeyRequest( + ) + + # Make the request + operation = client.update_key(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apikeys_v2_generated_ApiKeys_UpdateKey_sync] diff --git a/packages/google-cloud-api-keys/samples/generated_samples/snippet_metadata_google.api.apikeys.v2.json b/packages/google-cloud-api-keys/samples/generated_samples/snippet_metadata_google.api.apikeys.v2.json new file mode 100644 index 000000000000..3d8902cac4a6 --- /dev/null +++ b/packages/google-cloud-api-keys/samples/generated_samples/snippet_metadata_google.api.apikeys.v2.json @@ -0,0 +1,1311 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.api.apikeys.v2", + "version": "v2" + } + ], + "language": "PYTHON", + "name": "google-cloud-api-keys", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.create_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.CreateKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "CreateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.CreateKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "key", + "type": "google.cloud.api_keys_v2.types.Key" + }, + { + "name": "key_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_key" + }, + "description": "Sample for CreateKey", + "file": "apikeys_v2_generated_api_keys_create_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_CreateKey_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": "apikeys_v2_generated_api_keys_create_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.create_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.CreateKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "CreateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.CreateKeyRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "key", + "type": "google.cloud.api_keys_v2.types.Key" + }, + { + "name": "key_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_key" + }, + "description": "Sample for CreateKey", + "file": "apikeys_v2_generated_api_keys_create_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_CreateKey_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": "apikeys_v2_generated_api_keys_create_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.delete_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.DeleteKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "DeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.DeleteKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_key" + }, + "description": "Sample for DeleteKey", + "file": "apikeys_v2_generated_api_keys_delete_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_DeleteKey_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": "apikeys_v2_generated_api_keys_delete_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.delete_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.DeleteKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "DeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.DeleteKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_key" + }, + "description": "Sample for DeleteKey", + "file": "apikeys_v2_generated_api_keys_delete_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_DeleteKey_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": "apikeys_v2_generated_api_keys_delete_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.get_key_string", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.GetKeyString", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "GetKeyString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.GetKeyStringRequest" + }, + { + "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.api_keys_v2.types.GetKeyStringResponse", + "shortName": "get_key_string" + }, + "description": "Sample for GetKeyString", + "file": "apikeys_v2_generated_api_keys_get_key_string_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_GetKeyString_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": "apikeys_v2_generated_api_keys_get_key_string_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.get_key_string", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.GetKeyString", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "GetKeyString" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.GetKeyStringRequest" + }, + { + "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.api_keys_v2.types.GetKeyStringResponse", + "shortName": "get_key_string" + }, + "description": "Sample for GetKeyString", + "file": "apikeys_v2_generated_api_keys_get_key_string_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_GetKeyString_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": "apikeys_v2_generated_api_keys_get_key_string_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.get_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.GetKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "GetKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.GetKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.types.Key", + "shortName": "get_key" + }, + "description": "Sample for GetKey", + "file": "apikeys_v2_generated_api_keys_get_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_GetKey_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_get_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.get_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.GetKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "GetKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.GetKeyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.types.Key", + "shortName": "get_key" + }, + "description": "Sample for GetKey", + "file": "apikeys_v2_generated_api_keys_get_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_GetKey_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_get_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.list_keys", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.ListKeys", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "ListKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.ListKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.services.api_keys.pagers.ListKeysAsyncPager", + "shortName": "list_keys" + }, + "description": "Sample for ListKeys", + "file": "apikeys_v2_generated_api_keys_list_keys_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_ListKeys_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_list_keys_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.list_keys", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.ListKeys", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "ListKeys" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.ListKeysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.services.api_keys.pagers.ListKeysPager", + "shortName": "list_keys" + }, + "description": "Sample for ListKeys", + "file": "apikeys_v2_generated_api_keys_list_keys_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_ListKeys_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_list_keys_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.lookup_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.LookupKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "LookupKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.LookupKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.types.LookupKeyResponse", + "shortName": "lookup_key" + }, + "description": "Sample for LookupKey", + "file": "apikeys_v2_generated_api_keys_lookup_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_LookupKey_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": "apikeys_v2_generated_api_keys_lookup_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.lookup_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.LookupKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "LookupKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.LookupKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.api_keys_v2.types.LookupKeyResponse", + "shortName": "lookup_key" + }, + "description": "Sample for LookupKey", + "file": "apikeys_v2_generated_api_keys_lookup_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_LookupKey_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": "apikeys_v2_generated_api_keys_lookup_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.undelete_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.UndeleteKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "UndeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.UndeleteKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "undelete_key" + }, + "description": "Sample for UndeleteKey", + "file": "apikeys_v2_generated_api_keys_undelete_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_UndeleteKey_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": "apikeys_v2_generated_api_keys_undelete_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.undelete_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.UndeleteKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "UndeleteKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.UndeleteKeyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "undelete_key" + }, + "description": "Sample for UndeleteKey", + "file": "apikeys_v2_generated_api_keys_undelete_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_UndeleteKey_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": "apikeys_v2_generated_api_keys_undelete_key_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient", + "shortName": "ApiKeysAsyncClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysAsyncClient.update_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.UpdateKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "UpdateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.UpdateKeyRequest" + }, + { + "name": "key", + "type": "google.cloud.api_keys_v2.types.Key" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_key" + }, + "description": "Sample for UpdateKey", + "file": "apikeys_v2_generated_api_keys_update_key_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_UpdateKey_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_update_key_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.api_keys_v2.ApiKeysClient", + "shortName": "ApiKeysClient" + }, + "fullName": "google.cloud.api_keys_v2.ApiKeysClient.update_key", + "method": { + "fullName": "google.api.apikeys.v2.ApiKeys.UpdateKey", + "service": { + "fullName": "google.api.apikeys.v2.ApiKeys", + "shortName": "ApiKeys" + }, + "shortName": "UpdateKey" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.api_keys_v2.types.UpdateKeyRequest" + }, + { + "name": "key", + "type": "google.cloud.api_keys_v2.types.Key" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_key" + }, + "description": "Sample for UpdateKey", + "file": "apikeys_v2_generated_api_keys_update_key_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apikeys_v2_generated_ApiKeys_UpdateKey_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apikeys_v2_generated_api_keys_update_key_sync.py" + } + ] +} diff --git a/packages/google-cloud-api-keys/tests/unit/gapic/api_keys_v2/test_api_keys.py b/packages/google-cloud-api-keys/tests/unit/gapic/api_keys_v2/test_api_keys.py index 3f9796c878d1..38eb76ee55cd 100644 --- a/packages/google-cloud-api-keys/tests/unit/gapic/api_keys_v2/test_api_keys.py +++ b/packages/google-cloud-api-keys/tests/unit/gapic/api_keys_v2/test_api_keys.py @@ -1334,9 +1334,11 @@ async def test_list_keys_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_keys(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py index 4b0090fcc2d1..23722ffa1b8a 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py @@ -342,7 +342,7 @@ async def sample_list_connections(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ConnectionServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/tether/async_client.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/tether/async_client.py index 4f0e531bdfce..d3b520e9804e 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/tether/async_client.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/tether/async_client.py @@ -297,7 +297,7 @@ def request_generator(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TetherAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-apigee-connect/noxfile.py b/packages/google-cloud-apigee-connect/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-apigee-connect/noxfile.py +++ b/packages/google-cloud-apigee-connect/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_async.py b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_async.py new file mode 100644 index 000000000000..07d6eca5f4ca --- /dev/null +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-connect + + +# [START apigeeconnect_v1_generated_ConnectionService_ListConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigeeconnect_v1 + + +async def sample_list_connections(): + # Create a client + client = apigeeconnect_v1.ConnectionServiceAsyncClient() + + # Initialize request argument(s) + request = apigeeconnect_v1.ListConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeconnect_v1_generated_ConnectionService_ListConnections_async] diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_sync.py b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_sync.py new file mode 100644 index 000000000000..252cc083166e --- /dev/null +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_connection_service_list_connections_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-connect + + +# [START apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigeeconnect_v1 + + +def sample_list_connections(): + # Create a client + client = apigeeconnect_v1.ConnectionServiceClient() + + # Initialize request argument(s) + request = apigeeconnect_v1.ListConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_async.py b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_async.py new file mode 100644 index 000000000000..d5103598fdad --- /dev/null +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Egress +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-connect + + +# [START apigeeconnect_v1_generated_Tether_Egress_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigeeconnect_v1 + + +async def sample_egress(): + # Create a client + client = apigeeconnect_v1.TetherAsyncClient() + + # Initialize request argument(s) + request = apigeeconnect_v1.EgressResponse( + ) + + # This method expects an iterator which contains + # 'apigeeconnect_v1.EgressResponse' objects + # Here we create a generator that yields a single `request` for + # demonstrative purposes. + requests = [request] + + def request_generator(): + for request in requests: + yield request + + # Make the request + stream = await client.egress(requests=request_generator()) + + # Handle the response + async for response in stream: + print(response) + +# [END apigeeconnect_v1_generated_Tether_Egress_async] diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_sync.py b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_sync.py new file mode 100644 index 000000000000..ea432e503fbc --- /dev/null +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/apigeeconnect_v1_generated_tether_egress_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Egress +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-connect + + +# [START apigeeconnect_v1_generated_Tether_Egress_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigeeconnect_v1 + + +def sample_egress(): + # Create a client + client = apigeeconnect_v1.TetherClient() + + # Initialize request argument(s) + request = apigeeconnect_v1.EgressResponse( + ) + + # This method expects an iterator which contains + # 'apigeeconnect_v1.EgressResponse' objects + # Here we create a generator that yields a single `request` for + # demonstrative purposes. + requests = [request] + + def request_generator(): + for request in requests: + yield request + + # Make the request + stream = client.egress(requests=request_generator()) + + # Handle the response + for response in stream: + print(response) + +# [END apigeeconnect_v1_generated_Tether_Egress_sync] diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json new file mode 100644 index 000000000000..b8c1a4c55ebc --- /dev/null +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json @@ -0,0 +1,329 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.apigeeconnect.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-apigee-connect", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceAsyncClient", + "shortName": "ConnectionServiceAsyncClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceAsyncClient.list_connections", + "method": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", + "service": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService", + "shortName": "ConnectionService" + }, + "shortName": "ListConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigeeconnect_v1.types.ListConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigeeconnect_v1.services.connection_service.pagers.ListConnectionsAsyncPager", + "shortName": "list_connections" + }, + "description": "Sample for ListConnections", + "file": "apigeeconnect_v1_generated_connection_service_list_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeconnect_v1_generated_connection_service_list_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceClient", + "shortName": "ConnectionServiceClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceClient.list_connections", + "method": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", + "service": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService", + "shortName": "ConnectionService" + }, + "shortName": "ListConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigeeconnect_v1.types.ListConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigeeconnect_v1.services.connection_service.pagers.ListConnectionsPager", + "shortName": "list_connections" + }, + "description": "Sample for ListConnections", + "file": "apigeeconnect_v1_generated_connection_service_list_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeconnect_v1_generated_connection_service_list_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigeeconnect_v1.TetherAsyncClient", + "shortName": "TetherAsyncClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.TetherAsyncClient.egress", + "method": { + "fullName": "google.cloud.apigeeconnect.v1.Tether.Egress", + "service": { + "fullName": "google.cloud.apigeeconnect.v1.Tether", + "shortName": "Tether" + }, + "shortName": "Egress" + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.apigeeconnect_v1.types.EgressResponse]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.apigeeconnect_v1.types.EgressRequest]", + "shortName": "egress" + }, + "description": "Sample for Egress", + "file": "apigeeconnect_v1_generated_tether_egress_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeconnect_v1_generated_Tether_Egress_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeconnect_v1_generated_tether_egress_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigeeconnect_v1.TetherClient", + "shortName": "TetherClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.TetherClient.egress", + "method": { + "fullName": "google.cloud.apigeeconnect.v1.Tether.Egress", + "service": { + "fullName": "google.cloud.apigeeconnect.v1.Tether", + "shortName": "Tether" + }, + "shortName": "Egress" + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.apigeeconnect_v1.types.EgressResponse]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.apigeeconnect_v1.types.EgressRequest]", + "shortName": "egress" + }, + "description": "Sample for Egress", + "file": "apigeeconnect_v1_generated_tether_egress_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeconnect_v1_generated_Tether_Egress_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeconnect_v1_generated_tether_egress_sync.py" + } + ] +} diff --git a/packages/google-cloud-apigee-connect/tests/unit/gapic/apigeeconnect_v1/test_connection_service.py b/packages/google-cloud-apigee-connect/tests/unit/gapic/apigeeconnect_v1/test_connection_service.py index 1071ee324216..0fecc39ff745 100644 --- a/packages/google-cloud-apigee-connect/tests/unit/gapic/apigeeconnect_v1/test_connection_service.py +++ b/packages/google-cloud-apigee-connect/tests/unit/gapic/apigeeconnect_v1/test_connection_service.py @@ -1107,9 +1107,11 @@ async def test_list_connections_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_connections(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py index 944f5ff9a363..30274cc6e9dd 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.6.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py index 944f5ff9a363..30274cc6e9dd 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.6.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/async_client.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/async_client.py index 59b5d47d39b3..f58ddfc2d66e 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/async_client.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/async_client.py @@ -1215,7 +1215,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ProvisioningAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/transports/rest.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/transports/rest.py index ff8a0f39a8e6..8c2e4e5c0eaa 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/transports/rest.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/transports/rest.py @@ -1153,7 +1153,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1270,7 +1270,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1339,7 +1339,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/async_client.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/async_client.py index e80612a30ad1..3f757601ee11 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/async_client.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/async_client.py @@ -5173,7 +5173,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RegistryAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/transports/rest.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/transports/rest.py index ac4f0163a9c3..8cb5c6d5ca18 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/transports/rest.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/registry/transports/rest.py @@ -5569,7 +5569,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -5686,7 +5686,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -5755,7 +5755,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-apigee-registry/noxfile.py b/packages/google-cloud-apigee-registry/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-apigee-registry/noxfile.py +++ b/packages/google-cloud-apigee-registry/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_async.py new file mode 100644 index 000000000000..f6d04a0d4748 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_CreateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningAsyncClient() + + # Initialize request argument(s) + instance = apigee_registry_v1.Instance() + instance.config.cmek_key_name = "cmek_key_name_value" + + request = apigee_registry_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_CreateInstance_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_sync.py new file mode 100644 index 000000000000..7d7c20a5e267 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_create_instance_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningClient() + + # Initialize request argument(s) + instance = apigee_registry_v1.Instance() + instance.config.cmek_key_name = "cmek_key_name_value" + + request = apigee_registry_v1.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_async.py new file mode 100644 index 000000000000..a038007cad4d --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_sync.py new file mode 100644 index 000000000000..dca1a25a5f0d --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_delete_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_async.py new file mode 100644 index 000000000000..52aaa6a59330 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_GetInstance_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_sync.py new file mode 100644 index 000000000000..cdd1e6c3fe67 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_provisioning_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Provisioning_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_instance(): + # Create a client + client = apigee_registry_v1.ProvisioningClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Provisioning_GetInstance_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_async.py new file mode 100644 index 000000000000..1a5f46ca1a38 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_api(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiRequest( + parent="parent_value", + api_id="api_id_value", + ) + + # Make the request + response = await client.create_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApi_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_async.py new file mode 100644 index 000000000000..a03348ad70a7 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiDeploymentRequest( + parent="parent_value", + api_deployment_id="api_deployment_id_value", + ) + + # Make the request + response = await client.create_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_sync.py new file mode 100644 index 000000000000..7bd457b900e4 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_deployment_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiDeploymentRequest( + parent="parent_value", + api_deployment_id="api_deployment_id_value", + ) + + # Make the request + response = client.create_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_async.py new file mode 100644 index 000000000000..c039d508eb5e --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiSpec_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiSpecRequest( + parent="parent_value", + api_spec_id="api_spec_id_value", + ) + + # Make the request + response = await client.create_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiSpec_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_sync.py new file mode 100644 index 000000000000..584e58d00649 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_spec_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiSpecRequest( + parent="parent_value", + api_spec_id="api_spec_id_value", + ) + + # Make the request + response = client.create_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_sync.py new file mode 100644 index 000000000000..9f243bcb33a6 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_api(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiRequest( + parent="parent_value", + api_id="api_id_value", + ) + + # Make the request + response = client.create_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApi_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_async.py new file mode 100644 index 000000000000..8a98de384a4b --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_api_version(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiVersionRequest( + parent="parent_value", + api_version_id="api_version_id_value", + ) + + # Make the request + response = await client.create_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiVersion_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_sync.py new file mode 100644 index 000000000000..9c848b7509c7 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_api_version_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_api_version(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateApiVersionRequest( + parent="parent_value", + api_version_id="api_version_id_value", + ) + + # Make the request + response = client.create_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_async.py new file mode 100644 index 000000000000..508dc049e678 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateArtifact_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_create_artifact(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateArtifactRequest( + parent="parent_value", + artifact_id="artifact_id_value", + ) + + # Make the request + response = await client.create_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateArtifact_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_sync.py new file mode 100644 index 000000000000..296e18dc186d --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_create_artifact_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_CreateArtifact_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_create_artifact(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.CreateArtifactRequest( + parent="parent_value", + artifact_id="artifact_id_value", + ) + + # Make the request + response = client.create_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_CreateArtifact_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_async.py new file mode 100644 index 000000000000..9409fc999c07 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiRequest( + name="name_value", + ) + + # Make the request + await client.delete_api(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApi_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_async.py new file mode 100644 index 000000000000..63ccb365788a --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiDeploymentRequest( + name="name_value", + ) + + # Make the request + await client.delete_api_deployment(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_async.py new file mode 100644 index 000000000000..1b2c107e539a --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiDeploymentRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api_deployment_revision(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiDeploymentRevisionRequest( + name="name_value", + ) + + # Make the request + response = await client.delete_api_deployment_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_sync.py new file mode 100644 index 000000000000..e7604a814da6 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_revision_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiDeploymentRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api_deployment_revision(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiDeploymentRevisionRequest( + name="name_value", + ) + + # Make the request + response = client.delete_api_deployment_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_sync.py new file mode 100644 index 000000000000..fc04fc07ddb3 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_deployment_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiDeploymentRequest( + name="name_value", + ) + + # Make the request + client.delete_api_deployment(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_async.py new file mode 100644 index 000000000000..3843e1da78c6 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiSpecRequest( + name="name_value", + ) + + # Make the request + await client.delete_api_spec(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_async.py new file mode 100644 index 000000000000..630027fcf843 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiSpecRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api_spec_revision(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiSpecRevisionRequest( + name="name_value", + ) + + # Make the request + response = await client.delete_api_spec_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_sync.py new file mode 100644 index 000000000000..4b80ae89e2da --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_revision_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiSpecRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api_spec_revision(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiSpecRevisionRequest( + name="name_value", + ) + + # Make the request + response = client.delete_api_spec_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_sync.py new file mode 100644 index 000000000000..4e42cdfb7f1a --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_spec_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiSpecRequest( + name="name_value", + ) + + # Make the request + client.delete_api_spec(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_sync.py new file mode 100644 index 000000000000..69f6f7ca3840 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiRequest( + name="name_value", + ) + + # Make the request + client.delete_api(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApi_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_async.py new file mode 100644 index 000000000000..336528546d88 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_api_version(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiVersionRequest( + name="name_value", + ) + + # Make the request + await client.delete_api_version(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_sync.py new file mode 100644 index 000000000000..de4d888032c8 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_api_version_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_api_version(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteApiVersionRequest( + name="name_value", + ) + + # Make the request + client.delete_api_version(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_async.py new file mode 100644 index 000000000000..969bac23297c --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteArtifact_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_delete_artifact(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteArtifactRequest( + name="name_value", + ) + + # Make the request + await client.delete_artifact(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteArtifact_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_sync.py new file mode 100644 index 000000000000..69a30e8120d4 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_delete_artifact_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_delete_artifact(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.DeleteArtifactRequest( + name="name_value", + ) + + # Make the request + client.delete_artifact(request=request) + + +# [END apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_async.py new file mode 100644 index 000000000000..a540000b7e1e --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_api(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApi_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_async.py new file mode 100644 index 000000000000..86643b12268a --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiDeployment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiDeploymentRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiDeployment_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_sync.py new file mode 100644 index 000000000000..35577ae28fb7 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_deployment_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiDeploymentRequest( + name="name_value", + ) + + # Make the request + response = client.get_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_async.py new file mode 100644 index 000000000000..07e3d847ebcd --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiSpec_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiSpecRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiSpec_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_async.py new file mode 100644 index 000000000000..ef4f3e4569f1 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiSpecContents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_api_spec_contents(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiSpecContentsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api_spec_contents(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_sync.py new file mode 100644 index 000000000000..da917efaef07 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_contents_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiSpecContents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_api_spec_contents(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiSpecContentsRequest( + name="name_value", + ) + + # Make the request + response = client.get_api_spec_contents(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_sync.py new file mode 100644 index 000000000000..0cb887982bbb --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_spec_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiSpec_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiSpecRequest( + name="name_value", + ) + + # Make the request + response = client.get_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiSpec_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_sync.py new file mode 100644 index 000000000000..8257a5278a37 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_api(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiRequest( + name="name_value", + ) + + # Make the request + response = client.get_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApi_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_async.py new file mode 100644 index 000000000000..2452e5e58119 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_api_version(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiVersionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiVersion_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_sync.py new file mode 100644 index 000000000000..780eba28f955 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_api_version_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetApiVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_api_version(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetApiVersionRequest( + name="name_value", + ) + + # Make the request + response = client.get_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetApiVersion_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_async.py new file mode 100644 index 000000000000..c8c7f51b0815 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetArtifact_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_artifact(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetArtifactRequest( + name="name_value", + ) + + # Make the request + response = await client.get_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetArtifact_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_async.py new file mode 100644 index 000000000000..c0a612e4f5a4 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetArtifactContents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetArtifactContents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_get_artifact_contents(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetArtifactContentsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_artifact_contents(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetArtifactContents_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_sync.py new file mode 100644 index 000000000000..1f76c6b3d108 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_contents_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetArtifactContents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_artifact_contents(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetArtifactContentsRequest( + name="name_value", + ) + + # Make the request + response = client.get_artifact_contents(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_sync.py new file mode 100644 index 000000000000..5715ea5e81dd --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_get_artifact_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_GetArtifact_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_get_artifact(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.GetArtifactRequest( + name="name_value", + ) + + # Make the request + response = client.get_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_GetArtifact_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_async.py new file mode 100644 index 000000000000..3ae35f4b88e0 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiDeploymentRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_api_deployment_revisions(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiDeploymentRevisionsRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_api_deployment_revisions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_sync.py new file mode 100644 index 000000000000..0287d20f1506 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployment_revisions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiDeploymentRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_api_deployment_revisions(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiDeploymentRevisionsRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_api_deployment_revisions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_async.py new file mode 100644 index 000000000000..30a018c23696 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiDeployments +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiDeployments_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_api_deployments(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiDeploymentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_deployments(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiDeployments_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_sync.py new file mode 100644 index 000000000000..e3ea45d87acd --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_deployments_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiDeployments +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_api_deployments(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiDeploymentsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_deployments(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_async.py new file mode 100644 index 000000000000..addf14bdb081 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiSpecRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_api_spec_revisions(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiSpecRevisionsRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_api_spec_revisions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_sync.py new file mode 100644 index 000000000000..aca22d7b9d0e --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_spec_revisions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiSpecRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_api_spec_revisions(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiSpecRevisionsRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_api_spec_revisions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_async.py new file mode 100644 index 000000000000..d6dc72be8dcd --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiSpecs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiSpecs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_api_specs(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiSpecsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_specs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiSpecs_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_sync.py new file mode 100644 index 000000000000..c1d948ee6c88 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_specs_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiSpecs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_api_specs(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiSpecsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_specs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_async.py new file mode 100644 index 000000000000..0ba03f3a3875 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_api_versions(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiVersions_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_sync.py new file mode 100644 index 000000000000..915b612601f5 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_api_versions_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApiVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApiVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_api_versions(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApiVersionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_api_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApiVersions_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_async.py new file mode 100644 index 000000000000..2952b9289807 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApis_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_apis(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApisRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_apis(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApis_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_sync.py new file mode 100644 index 000000000000..4d8502c6fde2 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_apis_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListApis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListApis_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_apis(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListApisRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_apis(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListApis_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_async.py new file mode 100644 index 000000000000..798682c36ca2 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_list_artifacts(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListArtifactsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_artifacts(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListArtifacts_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_sync.py new file mode 100644 index 000000000000..ba38cd1fa9bc --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_list_artifacts_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ListArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_list_artifacts(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ListArtifactsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_artifacts(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END apigeeregistry_v1_generated_Registry_ListArtifacts_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_async.py new file mode 100644 index 000000000000..068f24520cdf --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReplaceArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_replace_artifact(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ReplaceArtifactRequest( + ) + + # Make the request + response = await client.replace_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_sync.py new file mode 100644 index 000000000000..3a1210b49fbb --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_replace_artifact_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReplaceArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_replace_artifact(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.ReplaceArtifactRequest( + ) + + # Make the request + response = client.replace_artifact(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_async.py new file mode 100644 index 000000000000..a8b26cab4db8 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RollbackApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_rollback_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.RollbackApiDeploymentRequest( + name="name_value", + revision_id="revision_id_value", + ) + + # Make the request + response = await client.rollback_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_sync.py new file mode 100644 index 000000000000..510524b65a23 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_deployment_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RollbackApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_rollback_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.RollbackApiDeploymentRequest( + name="name_value", + revision_id="revision_id_value", + ) + + # Make the request + response = client.rollback_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_async.py new file mode 100644 index 000000000000..db76ddcc119a --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RollbackApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_rollback_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.RollbackApiSpecRequest( + name="name_value", + revision_id="revision_id_value", + ) + + # Make the request + response = await client.rollback_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_sync.py new file mode 100644 index 000000000000..836f10b91dac --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_rollback_api_spec_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RollbackApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_rollback_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.RollbackApiSpecRequest( + name="name_value", + revision_id="revision_id_value", + ) + + # Make the request + response = client.rollback_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_async.py new file mode 100644 index 000000000000..7ac740afdf5f --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TagApiDeploymentRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_tag_api_deployment_revision(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.TagApiDeploymentRevisionRequest( + name="name_value", + tag="tag_value", + ) + + # Make the request + response = await client.tag_api_deployment_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_sync.py new file mode 100644 index 000000000000..315be450c982 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_deployment_revision_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TagApiDeploymentRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_tag_api_deployment_revision(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.TagApiDeploymentRevisionRequest( + name="name_value", + tag="tag_value", + ) + + # Make the request + response = client.tag_api_deployment_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_async.py new file mode 100644 index 000000000000..b97e8a671e06 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TagApiSpecRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_tag_api_spec_revision(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.TagApiSpecRevisionRequest( + name="name_value", + tag="tag_value", + ) + + # Make the request + response = await client.tag_api_spec_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_sync.py new file mode 100644 index 000000000000..d5ddbfb6d077 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_tag_api_spec_revision_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TagApiSpecRevision +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_tag_api_spec_revision(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.TagApiSpecRevisionRequest( + name="name_value", + tag="tag_value", + ) + + # Make the request + response = client.tag_api_spec_revision(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_async.py new file mode 100644 index 000000000000..7f0185ca2ed5 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApi_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_update_api(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiRequest( + ) + + # Make the request + response = await client.update_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApi_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_async.py new file mode 100644 index 000000000000..34fd97188bd8 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_update_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiDeploymentRequest( + ) + + # Make the request + response = await client.update_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_sync.py new file mode 100644 index 000000000000..144d74551190 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_deployment_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiDeployment +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_update_api_deployment(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiDeploymentRequest( + ) + + # Make the request + response = client.update_api_deployment(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_async.py new file mode 100644 index 000000000000..03059fac2e27 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_update_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiSpecRequest( + ) + + # Make the request + response = await client.update_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_sync.py new file mode 100644 index 000000000000..013de05bc82d --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_spec_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiSpec +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_update_api_spec(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiSpecRequest( + ) + + # Make the request + response = client.update_api_spec(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_sync.py new file mode 100644 index 000000000000..1991426f54cc --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApi +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApi_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_update_api(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiRequest( + ) + + # Make the request + response = client.update_api(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApi_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_async.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_async.py new file mode 100644 index 000000000000..e275a66a0a34 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +async def sample_update_api_version(): + # Create a client + client = apigee_registry_v1.RegistryAsyncClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiVersionRequest( + ) + + # Make the request + response = await client.update_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_async] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_sync.py b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_sync.py new file mode 100644 index 000000000000..af01cc8f69d7 --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/apigeeregistry_v1_generated_registry_update_api_version_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateApiVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-apigee-registry + + +# [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import apigee_registry_v1 + + +def sample_update_api_version(): + # Create a client + client = apigee_registry_v1.RegistryClient() + + # Initialize request argument(s) + request = apigee_registry_v1.UpdateApiVersionRequest( + ) + + # Make the request + response = client.update_api_version(request=request) + + # Handle the response + print(response) + +# [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json new file mode 100644 index 000000000000..399743edd3de --- /dev/null +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -0,0 +1,6183 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.apigeeregistry.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-apigee-registry", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient", + "shortName": "ProvisioningAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.apigee_registry_v1.types.Instance" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "apigeeregistry_v1_generated_provisioning_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_provisioning_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient", + "shortName": "ProvisioningClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient.create_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.apigee_registry_v1.types.Instance" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "apigeeregistry_v1_generated_provisioning_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_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": "apigeeregistry_v1_generated_provisioning_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient", + "shortName": "ProvisioningAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "apigeeregistry_v1_generated_provisioning_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_provisioning_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient", + "shortName": "ProvisioningClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient.delete_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "apigeeregistry_v1_generated_provisioning_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_provisioning_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient", + "shortName": "ProvisioningAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "apigeeregistry_v1_generated_provisioning_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_provisioning_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient", + "shortName": "ProvisioningClient" + }, + "fullName": "google.cloud.apigee_registry_v1.ProvisioningClient.get_instance", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Provisioning", + "shortName": "Provisioning" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "apigeeregistry_v1_generated_provisioning_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Provisioning_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_provisioning_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.create_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiDeploymentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_deployment", + "type": "google.cloud.apigee_registry_v1.types.ApiDeployment" + }, + { + "name": "api_deployment_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "create_api_deployment" + }, + "description": "Sample for CreateApiDeployment", + "file": "apigeeregistry_v1_generated_registry_create_api_deployment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_deployment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.create_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiDeploymentRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_deployment", + "type": "google.cloud.apigee_registry_v1.types.ApiDeployment" + }, + { + "name": "api_deployment_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "create_api_deployment" + }, + "description": "Sample for CreateApiDeployment", + "file": "apigeeregistry_v1_generated_registry_create_api_deployment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_deployment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.create_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiSpecRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_spec", + "type": "google.cloud.apigee_registry_v1.types.ApiSpec" + }, + { + "name": "api_spec_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "create_api_spec" + }, + "description": "Sample for CreateApiSpec", + "file": "apigeeregistry_v1_generated_registry_create_api_spec_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_spec_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.create_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiSpecRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_spec", + "type": "google.cloud.apigee_registry_v1.types.ApiSpec" + }, + { + "name": "api_spec_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "create_api_spec" + }, + "description": "Sample for CreateApiSpec", + "file": "apigeeregistry_v1_generated_registry_create_api_spec_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_spec_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.create_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_version", + "type": "google.cloud.apigee_registry_v1.types.ApiVersion" + }, + { + "name": "api_version_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiVersion", + "shortName": "create_api_version" + }, + "description": "Sample for CreateApiVersion", + "file": "apigeeregistry_v1_generated_registry_create_api_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.create_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiVersionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api_version", + "type": "google.cloud.apigee_registry_v1.types.ApiVersion" + }, + { + "name": "api_version_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiVersion", + "shortName": "create_api_version" + }, + "description": "Sample for CreateApiVersion", + "file": "apigeeregistry_v1_generated_registry_create_api_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.create_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api", + "type": "google.cloud.apigee_registry_v1.types.Api" + }, + { + "name": "api_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Api", + "shortName": "create_api" + }, + "description": "Sample for CreateApi", + "file": "apigeeregistry_v1_generated_registry_create_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApi_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.create_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateApiRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "api", + "type": "google.cloud.apigee_registry_v1.types.Api" + }, + { + "name": "api_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Api", + "shortName": "create_api" + }, + "description": "Sample for CreateApi", + "file": "apigeeregistry_v1_generated_registry_create_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApi_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.create_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateArtifactRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "artifact", + "type": "google.cloud.apigee_registry_v1.types.Artifact" + }, + { + "name": "artifact_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Artifact", + "shortName": "create_artifact" + }, + "description": "Sample for CreateArtifact", + "file": "apigeeregistry_v1_generated_registry_create_artifact_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateArtifact_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_artifact_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.create_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "CreateArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.CreateArtifactRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "artifact", + "type": "google.cloud.apigee_registry_v1.types.Artifact" + }, + { + "name": "artifact_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Artifact", + "shortName": "create_artifact" + }, + "description": "Sample for CreateArtifact", + "file": "apigeeregistry_v1_generated_registry_create_artifact_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_CreateArtifact_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_create_artifact_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api_deployment_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiDeploymentRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiDeploymentRevisionRequest" + }, + { + "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.apigee_registry_v1.types.ApiDeployment", + "shortName": "delete_api_deployment_revision" + }, + "description": "Sample for DeleteApiDeploymentRevision", + "file": "apigeeregistry_v1_generated_registry_delete_api_deployment_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_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": "apigeeregistry_v1_generated_registry_delete_api_deployment_revision_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api_deployment_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiDeploymentRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiDeploymentRevisionRequest" + }, + { + "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.apigee_registry_v1.types.ApiDeployment", + "shortName": "delete_api_deployment_revision" + }, + "description": "Sample for DeleteApiDeploymentRevision", + "file": "apigeeregistry_v1_generated_registry_delete_api_deployment_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_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": "apigeeregistry_v1_generated_registry_delete_api_deployment_revision_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiDeploymentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_deployment" + }, + "description": "Sample for DeleteApiDeployment", + "file": "apigeeregistry_v1_generated_registry_delete_api_deployment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_deployment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiDeploymentRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_deployment" + }, + "description": "Sample for DeleteApiDeployment", + "file": "apigeeregistry_v1_generated_registry_delete_api_deployment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_deployment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api_spec_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiSpecRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiSpecRevisionRequest" + }, + { + "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.apigee_registry_v1.types.ApiSpec", + "shortName": "delete_api_spec_revision" + }, + "description": "Sample for DeleteApiSpecRevision", + "file": "apigeeregistry_v1_generated_registry_delete_api_spec_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_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": "apigeeregistry_v1_generated_registry_delete_api_spec_revision_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api_spec_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiSpecRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiSpecRevisionRequest" + }, + { + "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.apigee_registry_v1.types.ApiSpec", + "shortName": "delete_api_spec_revision" + }, + "description": "Sample for DeleteApiSpecRevision", + "file": "apigeeregistry_v1_generated_registry_delete_api_spec_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_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": "apigeeregistry_v1_generated_registry_delete_api_spec_revision_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiSpecRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_spec" + }, + "description": "Sample for DeleteApiSpec", + "file": "apigeeregistry_v1_generated_registry_delete_api_spec_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_spec_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiSpecRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_spec" + }, + "description": "Sample for DeleteApiSpec", + "file": "apigeeregistry_v1_generated_registry_delete_api_spec_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_spec_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_version" + }, + "description": "Sample for DeleteApiVersion", + "file": "apigeeregistry_v1_generated_registry_delete_api_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiVersionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api_version" + }, + "description": "Sample for DeleteApiVersion", + "file": "apigeeregistry_v1_generated_registry_delete_api_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api" + }, + "description": "Sample for DeleteApi", + "file": "apigeeregistry_v1_generated_registry_delete_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApi_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteApiRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_api" + }, + "description": "Sample for DeleteApi", + "file": "apigeeregistry_v1_generated_registry_delete_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApi_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.delete_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteArtifactRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_artifact" + }, + "description": "Sample for DeleteArtifact", + "file": "apigeeregistry_v1_generated_registry_delete_artifact_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_artifact_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.delete_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "DeleteArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.DeleteArtifactRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_artifact" + }, + "description": "Sample for DeleteArtifact", + "file": "apigeeregistry_v1_generated_registry_delete_artifact_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_delete_artifact_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiDeploymentRequest" + }, + { + "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.apigee_registry_v1.types.ApiDeployment", + "shortName": "get_api_deployment" + }, + "description": "Sample for GetApiDeployment", + "file": "apigeeregistry_v1_generated_registry_get_api_deployment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_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": "apigeeregistry_v1_generated_registry_get_api_deployment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiDeploymentRequest" + }, + { + "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.apigee_registry_v1.types.ApiDeployment", + "shortName": "get_api_deployment" + }, + "description": "Sample for GetApiDeployment", + "file": "apigeeregistry_v1_generated_registry_get_api_deployment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_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": "apigeeregistry_v1_generated_registry_get_api_deployment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_api_spec_contents", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiSpecContents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiSpecContentsRequest" + }, + { + "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.httpbody_pb2.HttpBody", + "shortName": "get_api_spec_contents" + }, + "description": "Sample for GetApiSpecContents", + "file": "apigeeregistry_v1_generated_registry_get_api_spec_contents_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_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": "apigeeregistry_v1_generated_registry_get_api_spec_contents_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_api_spec_contents", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiSpecContents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiSpecContentsRequest" + }, + { + "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.httpbody_pb2.HttpBody", + "shortName": "get_api_spec_contents" + }, + "description": "Sample for GetApiSpecContents", + "file": "apigeeregistry_v1_generated_registry_get_api_spec_contents_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_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": "apigeeregistry_v1_generated_registry_get_api_spec_contents_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiSpecRequest" + }, + { + "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.apigee_registry_v1.types.ApiSpec", + "shortName": "get_api_spec" + }, + "description": "Sample for GetApiSpec", + "file": "apigeeregistry_v1_generated_registry_get_api_spec_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpec_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": "apigeeregistry_v1_generated_registry_get_api_spec_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiSpecRequest" + }, + { + "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.apigee_registry_v1.types.ApiSpec", + "shortName": "get_api_spec" + }, + "description": "Sample for GetApiSpec", + "file": "apigeeregistry_v1_generated_registry_get_api_spec_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpec_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": "apigeeregistry_v1_generated_registry_get_api_spec_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiVersionRequest" + }, + { + "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.apigee_registry_v1.types.ApiVersion", + "shortName": "get_api_version" + }, + "description": "Sample for GetApiVersion", + "file": "apigeeregistry_v1_generated_registry_get_api_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiVersion_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": "apigeeregistry_v1_generated_registry_get_api_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiVersionRequest" + }, + { + "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.apigee_registry_v1.types.ApiVersion", + "shortName": "get_api_version" + }, + "description": "Sample for GetApiVersion", + "file": "apigeeregistry_v1_generated_registry_get_api_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiVersion_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": "apigeeregistry_v1_generated_registry_get_api_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiRequest" + }, + { + "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.apigee_registry_v1.types.Api", + "shortName": "get_api" + }, + "description": "Sample for GetApi", + "file": "apigeeregistry_v1_generated_registry_get_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApi_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": "apigeeregistry_v1_generated_registry_get_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetApiRequest" + }, + { + "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.apigee_registry_v1.types.Api", + "shortName": "get_api" + }, + "description": "Sample for GetApi", + "file": "apigeeregistry_v1_generated_registry_get_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetApi_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": "apigeeregistry_v1_generated_registry_get_api_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_artifact_contents", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetArtifactContents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetArtifactContentsRequest" + }, + { + "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.httpbody_pb2.HttpBody", + "shortName": "get_artifact_contents" + }, + "description": "Sample for GetArtifactContents", + "file": "apigeeregistry_v1_generated_registry_get_artifact_contents_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_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": "apigeeregistry_v1_generated_registry_get_artifact_contents_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_artifact_contents", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetArtifactContents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetArtifactContentsRequest" + }, + { + "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.httpbody_pb2.HttpBody", + "shortName": "get_artifact_contents" + }, + "description": "Sample for GetArtifactContents", + "file": "apigeeregistry_v1_generated_registry_get_artifact_contents_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_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": "apigeeregistry_v1_generated_registry_get_artifact_contents_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.get_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetArtifactRequest" + }, + { + "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.apigee_registry_v1.types.Artifact", + "shortName": "get_artifact" + }, + "description": "Sample for GetArtifact", + "file": "apigeeregistry_v1_generated_registry_get_artifact_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifact_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": "apigeeregistry_v1_generated_registry_get_artifact_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.get_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "GetArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.GetArtifactRequest" + }, + { + "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.apigee_registry_v1.types.Artifact", + "shortName": "get_artifact" + }, + "description": "Sample for GetArtifact", + "file": "apigeeregistry_v1_generated_registry_get_artifact_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifact_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": "apigeeregistry_v1_generated_registry_get_artifact_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_api_deployment_revisions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiDeploymentRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiDeploymentRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiDeploymentRevisionsAsyncPager", + "shortName": "list_api_deployment_revisions" + }, + "description": "Sample for ListApiDeploymentRevisions", + "file": "apigeeregistry_v1_generated_registry_list_api_deployment_revisions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_deployment_revisions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_api_deployment_revisions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiDeploymentRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiDeploymentRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiDeploymentRevisionsPager", + "shortName": "list_api_deployment_revisions" + }, + "description": "Sample for ListApiDeploymentRevisions", + "file": "apigeeregistry_v1_generated_registry_list_api_deployment_revisions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_deployment_revisions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_api_deployments", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiDeployments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiDeploymentsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiDeploymentsAsyncPager", + "shortName": "list_api_deployments" + }, + "description": "Sample for ListApiDeployments", + "file": "apigeeregistry_v1_generated_registry_list_api_deployments_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_deployments_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_api_deployments", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiDeployments" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiDeploymentsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiDeploymentsPager", + "shortName": "list_api_deployments" + }, + "description": "Sample for ListApiDeployments", + "file": "apigeeregistry_v1_generated_registry_list_api_deployments_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_deployments_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_api_spec_revisions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiSpecRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiSpecRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiSpecRevisionsAsyncPager", + "shortName": "list_api_spec_revisions" + }, + "description": "Sample for ListApiSpecRevisions", + "file": "apigeeregistry_v1_generated_registry_list_api_spec_revisions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_spec_revisions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_api_spec_revisions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiSpecRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiSpecRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiSpecRevisionsPager", + "shortName": "list_api_spec_revisions" + }, + "description": "Sample for ListApiSpecRevisions", + "file": "apigeeregistry_v1_generated_registry_list_api_spec_revisions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_spec_revisions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_api_specs", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiSpecs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiSpecsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiSpecsAsyncPager", + "shortName": "list_api_specs" + }, + "description": "Sample for ListApiSpecs", + "file": "apigeeregistry_v1_generated_registry_list_api_specs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_specs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_api_specs", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiSpecs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiSpecsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiSpecsPager", + "shortName": "list_api_specs" + }, + "description": "Sample for ListApiSpecs", + "file": "apigeeregistry_v1_generated_registry_list_api_specs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_specs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_api_versions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiVersionsAsyncPager", + "shortName": "list_api_versions" + }, + "description": "Sample for ListApiVersions", + "file": "apigeeregistry_v1_generated_registry_list_api_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiVersions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_api_versions", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApiVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApiVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApiVersionsPager", + "shortName": "list_api_versions" + }, + "description": "Sample for ListApiVersions", + "file": "apigeeregistry_v1_generated_registry_list_api_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiVersions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_api_versions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_apis", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApis" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApisRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApisAsyncPager", + "shortName": "list_apis" + }, + "description": "Sample for ListApis", + "file": "apigeeregistry_v1_generated_registry_list_apis_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApis_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_apis_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_apis", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListApis" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListApisRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListApisPager", + "shortName": "list_apis" + }, + "description": "Sample for ListApis", + "file": "apigeeregistry_v1_generated_registry_list_apis_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListApis_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_apis_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.list_artifacts", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListArtifactsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListArtifactsAsyncPager", + "shortName": "list_artifacts" + }, + "description": "Sample for ListArtifacts", + "file": "apigeeregistry_v1_generated_registry_list_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListArtifacts_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.list_artifacts", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ListArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ListArtifactsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.services.registry.pagers.ListArtifactsPager", + "shortName": "list_artifacts" + }, + "description": "Sample for ListArtifacts", + "file": "apigeeregistry_v1_generated_registry_list_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ListArtifacts_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_list_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.replace_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ReplaceArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ReplaceArtifactRequest" + }, + { + "name": "artifact", + "type": "google.cloud.apigee_registry_v1.types.Artifact" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Artifact", + "shortName": "replace_artifact" + }, + "description": "Sample for ReplaceArtifact", + "file": "apigeeregistry_v1_generated_registry_replace_artifact_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_replace_artifact_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.replace_artifact", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "ReplaceArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.ReplaceArtifactRequest" + }, + { + "name": "artifact", + "type": "google.cloud.apigee_registry_v1.types.Artifact" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Artifact", + "shortName": "replace_artifact" + }, + "description": "Sample for ReplaceArtifact", + "file": "apigeeregistry_v1_generated_registry_replace_artifact_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_replace_artifact_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.rollback_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "RollbackApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.RollbackApiDeploymentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "rollback_api_deployment" + }, + "description": "Sample for RollbackApiDeployment", + "file": "apigeeregistry_v1_generated_registry_rollback_api_deployment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_rollback_api_deployment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.rollback_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "RollbackApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.RollbackApiDeploymentRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "rollback_api_deployment" + }, + "description": "Sample for RollbackApiDeployment", + "file": "apigeeregistry_v1_generated_registry_rollback_api_deployment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_rollback_api_deployment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.rollback_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "RollbackApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.RollbackApiSpecRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "rollback_api_spec" + }, + "description": "Sample for RollbackApiSpec", + "file": "apigeeregistry_v1_generated_registry_rollback_api_spec_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_rollback_api_spec_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.rollback_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "RollbackApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.RollbackApiSpecRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "rollback_api_spec" + }, + "description": "Sample for RollbackApiSpec", + "file": "apigeeregistry_v1_generated_registry_rollback_api_spec_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_rollback_api_spec_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.tag_api_deployment_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "TagApiDeploymentRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.TagApiDeploymentRevisionRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "tag_api_deployment_revision" + }, + "description": "Sample for TagApiDeploymentRevision", + "file": "apigeeregistry_v1_generated_registry_tag_api_deployment_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_tag_api_deployment_revision_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.tag_api_deployment_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "TagApiDeploymentRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.TagApiDeploymentRevisionRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "tag_api_deployment_revision" + }, + "description": "Sample for TagApiDeploymentRevision", + "file": "apigeeregistry_v1_generated_registry_tag_api_deployment_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_tag_api_deployment_revision_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.tag_api_spec_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "TagApiSpecRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.TagApiSpecRevisionRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "tag_api_spec_revision" + }, + "description": "Sample for TagApiSpecRevision", + "file": "apigeeregistry_v1_generated_registry_tag_api_spec_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_tag_api_spec_revision_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.tag_api_spec_revision", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "TagApiSpecRevision" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.TagApiSpecRevisionRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "tag_api_spec_revision" + }, + "description": "Sample for TagApiSpecRevision", + "file": "apigeeregistry_v1_generated_registry_tag_api_spec_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_tag_api_spec_revision_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.update_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiDeploymentRequest" + }, + { + "name": "api_deployment", + "type": "google.cloud.apigee_registry_v1.types.ApiDeployment" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "update_api_deployment" + }, + "description": "Sample for UpdateApiDeployment", + "file": "apigeeregistry_v1_generated_registry_update_api_deployment_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_deployment_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.update_api_deployment", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiDeployment" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiDeploymentRequest" + }, + { + "name": "api_deployment", + "type": "google.cloud.apigee_registry_v1.types.ApiDeployment" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiDeployment", + "shortName": "update_api_deployment" + }, + "description": "Sample for UpdateApiDeployment", + "file": "apigeeregistry_v1_generated_registry_update_api_deployment_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_deployment_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.update_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiSpecRequest" + }, + { + "name": "api_spec", + "type": "google.cloud.apigee_registry_v1.types.ApiSpec" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "update_api_spec" + }, + "description": "Sample for UpdateApiSpec", + "file": "apigeeregistry_v1_generated_registry_update_api_spec_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_spec_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.update_api_spec", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiSpec" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiSpecRequest" + }, + { + "name": "api_spec", + "type": "google.cloud.apigee_registry_v1.types.ApiSpec" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiSpec", + "shortName": "update_api_spec" + }, + "description": "Sample for UpdateApiSpec", + "file": "apigeeregistry_v1_generated_registry_update_api_spec_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_spec_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.update_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiVersionRequest" + }, + { + "name": "api_version", + "type": "google.cloud.apigee_registry_v1.types.ApiVersion" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiVersion", + "shortName": "update_api_version" + }, + "description": "Sample for UpdateApiVersion", + "file": "apigeeregistry_v1_generated_registry_update_api_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.update_api_version", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApiVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiVersionRequest" + }, + { + "name": "api_version", + "type": "google.cloud.apigee_registry_v1.types.ApiVersion" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.ApiVersion", + "shortName": "update_api_version" + }, + "description": "Sample for UpdateApiVersion", + "file": "apigeeregistry_v1_generated_registry_update_api_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient", + "shortName": "RegistryAsyncClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryAsyncClient.update_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiRequest" + }, + { + "name": "api", + "type": "google.cloud.apigee_registry_v1.types.Api" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Api", + "shortName": "update_api" + }, + "description": "Sample for UpdateApi", + "file": "apigeeregistry_v1_generated_registry_update_api_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApi_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.apigee_registry_v1.RegistryClient", + "shortName": "RegistryClient" + }, + "fullName": "google.cloud.apigee_registry_v1.RegistryClient.update_api", + "method": { + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "service": { + "fullName": "google.cloud.apigeeregistry.v1.Registry", + "shortName": "Registry" + }, + "shortName": "UpdateApi" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigee_registry_v1.types.UpdateApiRequest" + }, + { + "name": "api", + "type": "google.cloud.apigee_registry_v1.types.Api" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigee_registry_v1.types.Api", + "shortName": "update_api" + }, + "description": "Sample for UpdateApi", + "file": "apigeeregistry_v1_generated_registry_update_api_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApi_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "apigeeregistry_v1_generated_registry_update_api_sync.py" + } + ] +} diff --git a/packages/google-cloud-apigee-registry/tests/unit/gapic/apigee_registry_v1/test_registry.py b/packages/google-cloud-apigee-registry/tests/unit/gapic/apigee_registry_v1/test_registry.py index 26201af9a7ee..72b4e573c7ad 100644 --- a/packages/google-cloud-apigee-registry/tests/unit/gapic/apigee_registry_v1/test_registry.py +++ b/packages/google-cloud-apigee-registry/tests/unit/gapic/apigee_registry_v1/test_registry.py @@ -1088,9 +1088,11 @@ async def test_list_apis_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_apis(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2525,9 +2527,11 @@ async def test_list_api_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3972,9 +3976,11 @@ async def test_list_api_specs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_specs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5815,9 +5821,11 @@ async def test_list_api_spec_revisions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_spec_revisions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6730,9 +6738,11 @@ async def test_list_api_deployments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_deployments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8382,9 +8392,11 @@ async def test_list_api_deployment_revisions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_api_deployment_revisions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9274,9 +9286,11 @@ async def test_list_artifacts_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_artifacts(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py index e4a285c22d28..30274cc6e9dd 100644 --- a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py +++ b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.3.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py index e4a285c22d28..30274cc6e9dd 100644 --- a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py +++ b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.3.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-logging/noxfile.py b/packages/google-cloud-appengine-logging/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-appengine-logging/noxfile.py +++ b/packages/google-cloud-appengine-logging/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py index 90e02933f3a4..30274cc6e9dd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py index 90e02933f3a4..30274cc6e9dd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py index 4a10677b5dfa..f05a70f03736 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py @@ -4315,7 +4315,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ArtifactRegistryAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py index 90e02933f3a4..30274cc6e9dd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py index 3b97731366af..c17f5aba2779 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py @@ -3281,7 +3281,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ArtifactRegistryAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-artifact-registry/noxfile.py b/packages/google-cloud-artifact-registry/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-artifact-registry/noxfile.py +++ b/packages/google-cloud-artifact-registry/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py new file mode 100644 index 000000000000..32dd46068a29 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_create_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.CreateRepositoryRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_repository(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py new file mode 100644 index 000000000000..18f376bdaf19 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_create_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.CreateRepositoryRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_repository(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_async.py new file mode 100644 index 000000000000..e21043804141 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_create_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.CreateTagRequest( + ) + + # Make the request + response = await client.create_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_sync.py new file mode 100644 index 000000000000..0fb9cc3bc3c6 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_create_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.CreateTagRequest( + ) + + # Make the request + response = client.create_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_async.py new file mode 100644 index 000000000000..38d3a7ebf535 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_delete_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeletePackageRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_package(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_sync.py new file mode 100644 index 000000000000..19d45b81f3c4 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_package_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_delete_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeletePackageRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_package(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_async.py new file mode 100644 index 000000000000..279b4347cdf5 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_delete_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteRepositoryRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_repository(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_sync.py new file mode 100644 index 000000000000..439a59642879 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_repository_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_delete_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteRepositoryRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_repository(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_async.py new file mode 100644 index 000000000000..2632bee913ad --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_delete_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteTagRequest( + ) + + # Make the request + await client.delete_tag(request=request) + + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_sync.py new file mode 100644 index 000000000000..4eb5045af185 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_tag_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_delete_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteTagRequest( + ) + + # Make the request + client.delete_tag(request=request) + + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_async.py new file mode 100644 index 000000000000..61136816c81e --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_delete_version(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteVersionRequest( + ) + + # Make the request + operation = client.delete_version(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_sync.py new file mode 100644 index 000000000000..25d2c70d8302 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_delete_version_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_delete_version(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.DeleteVersionRequest( + ) + + # Make the request + operation = client.delete_version(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_async.py new file mode 100644 index 000000000000..2be8fc94e49f --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetDockerImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_docker_image(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetDockerImageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_docker_image(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_sync.py new file mode 100644 index 000000000000..7b4ca4723ab0 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_docker_image_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetDockerImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_docker_image(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetDockerImageRequest( + name="name_value", + ) + + # Make the request + response = client.get_docker_image(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_async.py new file mode 100644 index 000000000000..e5fdf8fbc0e0 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_file(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetFileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_file(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_sync.py new file mode 100644 index 000000000000..f89111bcd4ca --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_file_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_file(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetFileRequest( + name="name_value", + ) + + # Make the request + response = client.get_file(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_async.py new file mode 100644 index 000000000000..ea110824247c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_sync.py new file mode 100644 index 000000000000..14fe0394af82 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_async.py new file mode 100644 index 000000000000..ddbbc01911d8 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetMavenArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_maven_artifact(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetMavenArtifactRequest( + name="name_value", + ) + + # Make the request + response = await client.get_maven_artifact(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_sync.py new file mode 100644 index 000000000000..34ef8aea64dc --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_maven_artifact_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetMavenArtifact +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_maven_artifact(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetMavenArtifactRequest( + name="name_value", + ) + + # Make the request + response = client.get_maven_artifact(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_async.py new file mode 100644 index 000000000000..a94e8a087a14 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNpmPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_npm_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetNpmPackageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_npm_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_sync.py new file mode 100644 index 000000000000..923c676a3a12 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_npm_package_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNpmPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_npm_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetNpmPackageRequest( + name="name_value", + ) + + # Make the request + response = client.get_npm_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_async.py new file mode 100644 index 000000000000..7a6c1f2bf4eb --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetPackageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_sync.py new file mode 100644 index 000000000000..344ddc689bce --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_package_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetPackageRequest( + name="name_value", + ) + + # Make the request + response = client.get_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_async.py new file mode 100644 index 000000000000..d9d710ffda1e --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_project_settings(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetProjectSettingsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_sync.py new file mode 100644 index 000000000000..b188ec5f28b2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_project_settings_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_project_settings(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetProjectSettingsRequest( + name="name_value", + ) + + # Make the request + response = client.get_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_async.py new file mode 100644 index 000000000000..1b6d75d302c7 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPythonPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_python_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetPythonPackageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_python_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_sync.py new file mode 100644 index 000000000000..690f4eeeb089 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_python_package_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPythonPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_python_package(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetPythonPackageRequest( + name="name_value", + ) + + # Make the request + response = client.get_python_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_async.py new file mode 100644 index 000000000000..a179fa3ff87b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetRepositoryRequest( + name="name_value", + ) + + # Make the request + response = await client.get_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_sync.py new file mode 100644 index 000000000000..9bb8f5ac942a --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_repository_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetRepositoryRequest( + name="name_value", + ) + + # Make the request + response = client.get_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_async.py new file mode 100644 index 000000000000..3b72675aafc9 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetTagRequest( + ) + + # Make the request + response = await client.get_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_sync.py new file mode 100644 index 000000000000..737204f10a64 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetTagRequest( + ) + + # Make the request + response = client.get_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_async.py new file mode 100644 index 000000000000..28c39c408e68 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_version(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetVersionRequest( + ) + + # Make the request + response = await client.get_version(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_sync.py new file mode 100644 index 000000000000..61812831fb44 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_version_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_version(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetVersionRequest( + ) + + # Make the request + response = client.get_version(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_async.py new file mode 100644 index 000000000000..1d6b8a55590b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVPCSCConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_get_vpcsc_config(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetVPCSCConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_vpcsc_config(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_sync.py new file mode 100644 index 000000000000..bc03ea7f8b24 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVPCSCConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_get_vpcsc_config(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.GetVPCSCConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_vpcsc_config(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_async.py new file mode 100644 index 000000000000..c3d8e0a89338 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportAptArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_import_apt_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ImportAptArtifactsRequest( + ) + + # Make the request + operation = client.import_apt_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_sync.py new file mode 100644 index 000000000000..db566d20217c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportAptArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_import_apt_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ImportAptArtifactsRequest( + ) + + # Make the request + operation = client.import_apt_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_async.py new file mode 100644 index 000000000000..358ee3c53e87 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportYumArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_import_yum_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ImportYumArtifactsRequest( + ) + + # Make the request + operation = client.import_yum_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_sync.py new file mode 100644 index 000000000000..44dba323667b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportYumArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_import_yum_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ImportYumArtifactsRequest( + ) + + # Make the request + operation = client.import_yum_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_async.py new file mode 100644 index 000000000000..b422293b9027 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListDockerImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_docker_images(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListDockerImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_docker_images(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_sync.py new file mode 100644 index 000000000000..0a77e756a2f7 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_docker_images_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListDockerImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_docker_images(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListDockerImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_docker_images(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_async.py new file mode 100644 index 000000000000..8a099a657cc8 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_files(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListFilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_files(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_sync.py new file mode 100644 index 000000000000..97f399c5e1eb --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_files_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_files(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListFilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_files(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_async.py new file mode 100644 index 000000000000..00a824dfc1ae --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListMavenArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_maven_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListMavenArtifactsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_maven_artifacts(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_sync.py new file mode 100644 index 000000000000..d934ccea8fed --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListMavenArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_maven_artifacts(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListMavenArtifactsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_maven_artifacts(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_async.py new file mode 100644 index 000000000000..f360c472973b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNpmPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_npm_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListNpmPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_npm_packages(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_sync.py new file mode 100644 index 000000000000..01d7a2af37e7 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_npm_packages_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNpmPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_npm_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListNpmPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_npm_packages(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_async.py new file mode 100644 index 000000000000..c68a198acfee --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_packages(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_sync.py new file mode 100644 index 000000000000..ca50ad5b157b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_packages_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_packages(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_async.py new file mode 100644 index 000000000000..34cc1fed2f70 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPythonPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_python_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListPythonPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_python_packages(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_sync.py new file mode 100644 index 000000000000..7aa08b18b361 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_python_packages_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPythonPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_python_packages(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListPythonPackagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_python_packages(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_async.py new file mode 100644 index 000000000000..b9ed402ff30d --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRepositories +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_repositories(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListRepositoriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_repositories(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_sync.py new file mode 100644 index 000000000000..7785d28af230 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_repositories_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRepositories +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_repositories(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListRepositoriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_repositories(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_async.py new file mode 100644 index 000000000000..6be123e43ba0 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTags +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_tags(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListTagsRequest( + ) + + # Make the request + page_result = client.list_tags(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_sync.py new file mode 100644 index 000000000000..8c53895c8452 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_tags_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTags +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_tags(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListTagsRequest( + ) + + # Make the request + page_result = client.list_tags(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_async.py new file mode 100644 index 000000000000..457b7108e793 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_list_versions(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListVersionsRequest( + ) + + # Make the request + page_result = client.list_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_sync.py new file mode 100644 index 000000000000..94e8b61360b5 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_list_versions_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_list_versions(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.ListVersionsRequest( + ) + + # Make the request + page_result = client.list_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_async.py new file mode 100644 index 000000000000..72c4b811b1e2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_sync.py new file mode 100644 index 000000000000..30318f0bd1a6 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_async.py new file mode 100644 index 000000000000..d8822d54571e --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_sync.py new file mode 100644 index 000000000000..008e93415b0c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_async.py new file mode 100644 index 000000000000..2c4dc2082151 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_update_project_settings(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateProjectSettingsRequest( + ) + + # Make the request + response = await client.update_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_sync.py new file mode 100644 index 000000000000..daf079be6f6c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_project_settings_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_update_project_settings(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateProjectSettingsRequest( + ) + + # Make the request + response = client.update_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_async.py new file mode 100644 index 000000000000..3a5d7e5e4a90 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_update_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateRepositoryRequest( + ) + + # Make the request + response = await client.update_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_sync.py new file mode 100644 index 000000000000..880bbf04e91a --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_repository_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_update_repository(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateRepositoryRequest( + ) + + # Make the request + response = client.update_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_async.py new file mode 100644 index 000000000000..cd23fd16a807 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_update_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateTagRequest( + ) + + # Make the request + response = await client.update_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_sync.py new file mode 100644 index 000000000000..a978282ce8b4 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_update_tag(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateTagRequest( + ) + + # Make the request + response = client.update_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_async.py new file mode 100644 index 000000000000..e30682eb9158 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateVPCSCConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +async def sample_update_vpcsc_config(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateVPCSCConfigRequest( + ) + + # Make the request + response = await client.update_vpcsc_config(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_sync.py new file mode 100644 index 000000000000..a7267b09cf9e --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateVPCSCConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1 + + +def sample_update_vpcsc_config(): + # Create a client + client = artifactregistry_v1.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1.UpdateVPCSCConfigRequest( + ) + + # Make the request + response = client.update_vpcsc_config(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_async.py new file mode 100644 index 000000000000..7bee00e1efc2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_create_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.CreateRepositoryRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_repository(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_sync.py new file mode 100644 index 000000000000..ebb4bf48a4fb --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_repository_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_create_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.CreateRepositoryRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_repository(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_async.py new file mode 100644 index 000000000000..36dd67cca0f6 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_create_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.CreateTagRequest( + ) + + # Make the request + response = await client.create_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_sync.py new file mode 100644 index 000000000000..add01b2c2ad9 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_create_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_create_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.CreateTagRequest( + ) + + # Make the request + response = client.create_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_async.py new file mode 100644 index 000000000000..9be8152e0501 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_delete_package(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeletePackageRequest( + ) + + # Make the request + operation = client.delete_package(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_sync.py new file mode 100644 index 000000000000..b6e5a7ee1f17 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_package_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_delete_package(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeletePackageRequest( + ) + + # Make the request + operation = client.delete_package(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_async.py new file mode 100644 index 000000000000..32f70c79b2ef --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_delete_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteRepositoryRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_repository(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_sync.py new file mode 100644 index 000000000000..62a1456b4c6b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_repository_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_delete_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteRepositoryRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_repository(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_async.py new file mode 100644 index 000000000000..8e04e7193199 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_delete_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteTagRequest( + ) + + # Make the request + await client.delete_tag(request=request) + + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_sync.py new file mode 100644 index 000000000000..a47ac3c13582 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_tag_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_delete_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteTagRequest( + ) + + # Make the request + client.delete_tag(request=request) + + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_async.py new file mode 100644 index 000000000000..9d1d2b3c427b --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_delete_version(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteVersionRequest( + ) + + # Make the request + operation = client.delete_version(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_sync.py new file mode 100644 index 000000000000..d2553a6769a3 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_delete_version_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_delete_version(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.DeleteVersionRequest( + ) + + # Make the request + operation = client.delete_version(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_async.py new file mode 100644 index 000000000000..5cb4f4eec22a --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_file(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetFileRequest( + ) + + # Make the request + response = await client.get_file(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_sync.py new file mode 100644 index 000000000000..39a8dcdd1c7f --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_file_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_file(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetFileRequest( + ) + + # Make the request + response = client.get_file(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_async.py new file mode 100644 index 000000000000..44f239b97f73 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_sync.py new file mode 100644 index 000000000000..78347937d488 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_async.py new file mode 100644 index 000000000000..ef635db571a0 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_package(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetPackageRequest( + ) + + # Make the request + response = await client.get_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_sync.py new file mode 100644 index 000000000000..26ad01a1c5e8 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_package_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPackage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_package(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetPackageRequest( + ) + + # Make the request + response = client.get_package(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_async.py new file mode 100644 index 000000000000..122a2179bcc1 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_project_settings(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetProjectSettingsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_sync.py new file mode 100644 index 000000000000..ec43fe35cb15 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_project_settings(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetProjectSettingsRequest( + name="name_value", + ) + + # Make the request + response = client.get_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_async.py new file mode 100644 index 000000000000..58f71b6ddb17 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetRepositoryRequest( + name="name_value", + ) + + # Make the request + response = await client.get_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_sync.py new file mode 100644 index 000000000000..3afeaeb8c4f1 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_repository_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetRepositoryRequest( + name="name_value", + ) + + # Make the request + response = client.get_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_async.py new file mode 100644 index 000000000000..e77c79ecc7dc --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetTagRequest( + ) + + # Make the request + response = await client.get_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_sync.py new file mode 100644 index 000000000000..a2767c9416ac --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetTagRequest( + ) + + # Make the request + response = client.get_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_async.py new file mode 100644 index 000000000000..8c8596dcd7ce --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_get_version(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetVersionRequest( + ) + + # Make the request + response = await client.get_version(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_sync.py new file mode 100644 index 000000000000..067c4bd48b16 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_get_version_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVersion +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_get_version(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.GetVersionRequest( + ) + + # Make the request + response = client.get_version(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_async.py new file mode 100644 index 000000000000..6221dddd4c31 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportAptArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_import_apt_artifacts(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ImportAptArtifactsRequest( + ) + + # Make the request + operation = client.import_apt_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_sync.py new file mode 100644 index 000000000000..e9f801a3ea1a --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportAptArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_import_apt_artifacts(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ImportAptArtifactsRequest( + ) + + # Make the request + operation = client.import_apt_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_async.py new file mode 100644 index 000000000000..08e57605b93c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportYumArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_import_yum_artifacts(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ImportYumArtifactsRequest( + ) + + # Make the request + operation = client.import_yum_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_sync.py new file mode 100644 index 000000000000..fd09727f12eb --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportYumArtifacts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_import_yum_artifacts(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ImportYumArtifactsRequest( + ) + + # Make the request + operation = client.import_yum_artifacts(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_async.py new file mode 100644 index 000000000000..c5642ec4a6db --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_list_files(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListFilesRequest( + ) + + # Make the request + page_result = client.list_files(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_sync.py new file mode 100644 index 000000000000..13b3145b8941 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_files_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_list_files(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListFilesRequest( + ) + + # Make the request + page_result = client.list_files(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_async.py new file mode 100644 index 000000000000..5f2e426dc06d --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_list_packages(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListPackagesRequest( + ) + + # Make the request + page_result = client.list_packages(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_sync.py new file mode 100644 index 000000000000..857914212e5d --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_packages_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPackages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_list_packages(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListPackagesRequest( + ) + + # Make the request + page_result = client.list_packages(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_async.py new file mode 100644 index 000000000000..ccb952e753df --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRepositories +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_list_repositories(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListRepositoriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_repositories(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_sync.py new file mode 100644 index 000000000000..341f021696a4 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_repositories_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRepositories +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_list_repositories(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListRepositoriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_repositories(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_async.py new file mode 100644 index 000000000000..45015ba73aa2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTags +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_list_tags(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListTagsRequest( + ) + + # Make the request + page_result = client.list_tags(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_sync.py new file mode 100644 index 000000000000..16aabdd058f2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_tags_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTags +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_list_tags(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListTagsRequest( + ) + + # Make the request + page_result = client.list_tags(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_async.py new file mode 100644 index 000000000000..0e3ec630e3e7 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_list_versions(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListVersionsRequest( + ) + + # Make the request + page_result = client.list_versions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_sync.py new file mode 100644 index 000000000000..8cf90910b61c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_list_versions_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVersions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_list_versions(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.ListVersionsRequest( + ) + + # Make the request + page_result = client.list_versions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_async.py new file mode 100644 index 000000000000..95ee17cf2858 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_sync.py new file mode 100644 index 000000000000..4a3b05c621b9 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_async.py new file mode 100644 index 000000000000..3d6b03b360c4 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_sync.py new file mode 100644 index 000000000000..bc6f86e2a0dc --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_async.py new file mode 100644 index 000000000000..021d91a585aa --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_update_project_settings(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateProjectSettingsRequest( + ) + + # Make the request + response = await client.update_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_sync.py new file mode 100644 index 000000000000..3a733fbd4f8c --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProjectSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_update_project_settings(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateProjectSettingsRequest( + ) + + # Make the request + response = client.update_project_settings(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_async.py new file mode 100644 index 000000000000..47fbaf0d36f2 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_update_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateRepositoryRequest( + ) + + # Make the request + response = await client.update_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_sync.py new file mode 100644 index 000000000000..07f415a37504 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_repository_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateRepository +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_update_repository(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateRepositoryRequest( + ) + + # Make the request + response = client.update_repository(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_async.py new file mode 100644 index 000000000000..8b35e1727fca --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +async def sample_update_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryAsyncClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateTagRequest( + ) + + # Make the request + response = await client.update_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_sync.py new file mode 100644 index 000000000000..1d171da13382 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1beta2_generated_artifact_registry_update_tag_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTag +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-artifact-registry + + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import artifactregistry_v1beta2 + + +def sample_update_tag(): + # Create a client + client = artifactregistry_v1beta2.ArtifactRegistryClient() + + # Initialize request argument(s) + request = artifactregistry_v1beta2.UpdateTagRequest( + ) + + # Make the request + response = client.update_tag(request=request) + + # Handle the response + print(response) + +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json new file mode 100644 index 000000000000..6b7b72163498 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -0,0 +1,5668 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.devtools.artifactregistry.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-artifact-registry", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.create_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.CreateRepositoryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1.types.Repository" + }, + { + "name": "repository_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_repository" + }, + "description": "Sample for CreateRepository", + "file": "artifactregistry_v1_generated_artifact_registry_create_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_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": "artifactregistry_v1_generated_artifact_registry_create_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.create_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.CreateRepositoryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1.types.Repository" + }, + { + "name": "repository_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_repository" + }, + "description": "Sample for CreateRepository", + "file": "artifactregistry_v1_generated_artifact_registry_create_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_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": "artifactregistry_v1_generated_artifact_registry_create_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.create_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.CreateTagRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1.types.Tag" + }, + { + "name": "tag_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Tag", + "shortName": "create_tag" + }, + "description": "Sample for CreateTag", + "file": "artifactregistry_v1_generated_artifact_registry_create_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_create_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.create_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.CreateTagRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1.types.Tag" + }, + { + "name": "tag_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Tag", + "shortName": "create_tag" + }, + "description": "Sample for CreateTag", + "file": "artifactregistry_v1_generated_artifact_registry_create_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_create_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.delete_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeletePackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeletePackageRequest" + }, + { + "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_package" + }, + "description": "Sample for DeletePackage", + "file": "artifactregistry_v1_generated_artifact_registry_delete_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_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": "artifactregistry_v1_generated_artifact_registry_delete_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.delete_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeletePackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeletePackageRequest" + }, + { + "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_package" + }, + "description": "Sample for DeletePackage", + "file": "artifactregistry_v1_generated_artifact_registry_delete_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_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": "artifactregistry_v1_generated_artifact_registry_delete_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.delete_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteRepositoryRequest" + }, + { + "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_repository" + }, + "description": "Sample for DeleteRepository", + "file": "artifactregistry_v1_generated_artifact_registry_delete_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_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": "artifactregistry_v1_generated_artifact_registry_delete_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.delete_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteRepositoryRequest" + }, + { + "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_repository" + }, + "description": "Sample for DeleteRepository", + "file": "artifactregistry_v1_generated_artifact_registry_delete_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_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": "artifactregistry_v1_generated_artifact_registry_delete_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.delete_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteTagRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_tag" + }, + "description": "Sample for DeleteTag", + "file": "artifactregistry_v1_generated_artifact_registry_delete_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_delete_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.delete_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteTagRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_tag" + }, + "description": "Sample for DeleteTag", + "file": "artifactregistry_v1_generated_artifact_registry_delete_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_delete_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.delete_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteVersionRequest" + }, + { + "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_version" + }, + "description": "Sample for DeleteVersion", + "file": "artifactregistry_v1_generated_artifact_registry_delete_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_delete_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.delete_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.DeleteVersionRequest" + }, + { + "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_version" + }, + "description": "Sample for DeleteVersion", + "file": "artifactregistry_v1_generated_artifact_registry_delete_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_delete_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_docker_image", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetDockerImage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetDockerImageRequest" + }, + { + "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.artifactregistry_v1.types.DockerImage", + "shortName": "get_docker_image" + }, + "description": "Sample for GetDockerImage", + "file": "artifactregistry_v1_generated_artifact_registry_get_docker_image_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_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": "artifactregistry_v1_generated_artifact_registry_get_docker_image_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_docker_image", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetDockerImage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetDockerImageRequest" + }, + { + "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.artifactregistry_v1.types.DockerImage", + "shortName": "get_docker_image" + }, + "description": "Sample for GetDockerImage", + "file": "artifactregistry_v1_generated_artifact_registry_get_docker_image_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_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": "artifactregistry_v1_generated_artifact_registry_get_docker_image_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_file", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetFile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetFileRequest" + }, + { + "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.artifactregistry_v1.types.File", + "shortName": "get_file" + }, + "description": "Sample for GetFile", + "file": "artifactregistry_v1_generated_artifact_registry_get_file_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_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": "artifactregistry_v1_generated_artifact_registry_get_file_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_file", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetFile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetFileRequest" + }, + { + "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.artifactregistry_v1.types.File", + "shortName": "get_file" + }, + "description": "Sample for GetFile", + "file": "artifactregistry_v1_generated_artifact_registry_get_file_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_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": "artifactregistry_v1_generated_artifact_registry_get_file_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "artifactregistry_v1_generated_artifact_registry_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "artifactregistry_v1_generated_artifact_registry_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_maven_artifact", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetMavenArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetMavenArtifactRequest" + }, + { + "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.artifactregistry_v1.types.MavenArtifact", + "shortName": "get_maven_artifact" + }, + "description": "Sample for GetMavenArtifact", + "file": "artifactregistry_v1_generated_artifact_registry_get_maven_artifact_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_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": "artifactregistry_v1_generated_artifact_registry_get_maven_artifact_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_maven_artifact", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetMavenArtifact" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetMavenArtifactRequest" + }, + { + "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.artifactregistry_v1.types.MavenArtifact", + "shortName": "get_maven_artifact" + }, + "description": "Sample for GetMavenArtifact", + "file": "artifactregistry_v1_generated_artifact_registry_get_maven_artifact_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_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": "artifactregistry_v1_generated_artifact_registry_get_maven_artifact_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_npm_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetNpmPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetNpmPackageRequest" + }, + { + "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.artifactregistry_v1.types.NpmPackage", + "shortName": "get_npm_package" + }, + "description": "Sample for GetNpmPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_npm_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_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": "artifactregistry_v1_generated_artifact_registry_get_npm_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_npm_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetNpmPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetNpmPackageRequest" + }, + { + "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.artifactregistry_v1.types.NpmPackage", + "shortName": "get_npm_package" + }, + "description": "Sample for GetNpmPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_npm_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_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": "artifactregistry_v1_generated_artifact_registry_get_npm_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetPackageRequest" + }, + { + "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.artifactregistry_v1.types.Package", + "shortName": "get_package" + }, + "description": "Sample for GetPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_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": "artifactregistry_v1_generated_artifact_registry_get_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetPackageRequest" + }, + { + "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.artifactregistry_v1.types.Package", + "shortName": "get_package" + }, + "description": "Sample for GetPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_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": "artifactregistry_v1_generated_artifact_registry_get_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetProjectSettingsRequest" + }, + { + "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.artifactregistry_v1.types.ProjectSettings", + "shortName": "get_project_settings" + }, + "description": "Sample for GetProjectSettings", + "file": "artifactregistry_v1_generated_artifact_registry_get_project_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_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": "artifactregistry_v1_generated_artifact_registry_get_project_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetProjectSettingsRequest" + }, + { + "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.artifactregistry_v1.types.ProjectSettings", + "shortName": "get_project_settings" + }, + "description": "Sample for GetProjectSettings", + "file": "artifactregistry_v1_generated_artifact_registry_get_project_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_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": "artifactregistry_v1_generated_artifact_registry_get_project_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_python_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPythonPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetPythonPackageRequest" + }, + { + "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.artifactregistry_v1.types.PythonPackage", + "shortName": "get_python_package" + }, + "description": "Sample for GetPythonPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_python_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_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": "artifactregistry_v1_generated_artifact_registry_get_python_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_python_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPythonPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetPythonPackageRequest" + }, + { + "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.artifactregistry_v1.types.PythonPackage", + "shortName": "get_python_package" + }, + "description": "Sample for GetPythonPackage", + "file": "artifactregistry_v1_generated_artifact_registry_get_python_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_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": "artifactregistry_v1_generated_artifact_registry_get_python_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetRepositoryRequest" + }, + { + "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.artifactregistry_v1.types.Repository", + "shortName": "get_repository" + }, + "description": "Sample for GetRepository", + "file": "artifactregistry_v1_generated_artifact_registry_get_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_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": "artifactregistry_v1_generated_artifact_registry_get_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetRepositoryRequest" + }, + { + "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.artifactregistry_v1.types.Repository", + "shortName": "get_repository" + }, + "description": "Sample for GetRepository", + "file": "artifactregistry_v1_generated_artifact_registry_get_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_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": "artifactregistry_v1_generated_artifact_registry_get_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetTagRequest" + }, + { + "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.artifactregistry_v1.types.Tag", + "shortName": "get_tag" + }, + "description": "Sample for GetTag", + "file": "artifactregistry_v1_generated_artifact_registry_get_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetTagRequest" + }, + { + "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.artifactregistry_v1.types.Tag", + "shortName": "get_tag" + }, + "description": "Sample for GetTag", + "file": "artifactregistry_v1_generated_artifact_registry_get_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_vpcsc_config", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVPCSCConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetVPCSCConfigRequest" + }, + { + "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.artifactregistry_v1.types.VPCSCConfig", + "shortName": "get_vpcsc_config" + }, + "description": "Sample for GetVPCSCConfig", + "file": "artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_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": "artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_vpcsc_config", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVPCSCConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetVPCSCConfigRequest" + }, + { + "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.artifactregistry_v1.types.VPCSCConfig", + "shortName": "get_vpcsc_config" + }, + "description": "Sample for GetVPCSCConfig", + "file": "artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_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": "artifactregistry_v1_generated_artifact_registry_get_vpcsc_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.get_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetVersionRequest" + }, + { + "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.artifactregistry_v1.types.Version", + "shortName": "get_version" + }, + "description": "Sample for GetVersion", + "file": "artifactregistry_v1_generated_artifact_registry_get_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.get_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.GetVersionRequest" + }, + { + "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.artifactregistry_v1.types.Version", + "shortName": "get_version" + }, + "description": "Sample for GetVersion", + "file": "artifactregistry_v1_generated_artifact_registry_get_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_get_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.import_apt_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportAptArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ImportAptArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_apt_artifacts" + }, + "description": "Sample for ImportAptArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.import_apt_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportAptArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ImportAptArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_apt_artifacts" + }, + "description": "Sample for ImportAptArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_import_apt_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.import_yum_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportYumArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ImportYumArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_yum_artifacts" + }, + "description": "Sample for ImportYumArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.import_yum_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportYumArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ImportYumArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_yum_artifacts" + }, + "description": "Sample for ImportYumArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_import_yum_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_docker_images", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListDockerImages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListDockerImagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListDockerImagesAsyncPager", + "shortName": "list_docker_images" + }, + "description": "Sample for ListDockerImages", + "file": "artifactregistry_v1_generated_artifact_registry_list_docker_images_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_docker_images_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_docker_images", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListDockerImages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListDockerImagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListDockerImagesPager", + "shortName": "list_docker_images" + }, + "description": "Sample for ListDockerImages", + "file": "artifactregistry_v1_generated_artifact_registry_list_docker_images_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_docker_images_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_files", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListFiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListFilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListFilesAsyncPager", + "shortName": "list_files" + }, + "description": "Sample for ListFiles", + "file": "artifactregistry_v1_generated_artifact_registry_list_files_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_files_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_files", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListFiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListFilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListFilesPager", + "shortName": "list_files" + }, + "description": "Sample for ListFiles", + "file": "artifactregistry_v1_generated_artifact_registry_list_files_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_files_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_maven_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListMavenArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListMavenArtifactsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListMavenArtifactsAsyncPager", + "shortName": "list_maven_artifacts" + }, + "description": "Sample for ListMavenArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_maven_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListMavenArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListMavenArtifactsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListMavenArtifactsPager", + "shortName": "list_maven_artifacts" + }, + "description": "Sample for ListMavenArtifacts", + "file": "artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_maven_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_npm_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListNpmPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListNpmPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListNpmPackagesAsyncPager", + "shortName": "list_npm_packages" + }, + "description": "Sample for ListNpmPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_npm_packages_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_npm_packages_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_npm_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListNpmPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListNpmPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListNpmPackagesPager", + "shortName": "list_npm_packages" + }, + "description": "Sample for ListNpmPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_npm_packages_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_npm_packages_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPackagesAsyncPager", + "shortName": "list_packages" + }, + "description": "Sample for ListPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_packages_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_packages_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPackagesPager", + "shortName": "list_packages" + }, + "description": "Sample for ListPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_packages_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_packages_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_python_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPythonPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListPythonPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPythonPackagesAsyncPager", + "shortName": "list_python_packages" + }, + "description": "Sample for ListPythonPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_python_packages_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_python_packages_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_python_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPythonPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListPythonPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPythonPackagesPager", + "shortName": "list_python_packages" + }, + "description": "Sample for ListPythonPackages", + "file": "artifactregistry_v1_generated_artifact_registry_list_python_packages_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_python_packages_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_repositories", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListRepositories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListRepositoriesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListRepositoriesAsyncPager", + "shortName": "list_repositories" + }, + "description": "Sample for ListRepositories", + "file": "artifactregistry_v1_generated_artifact_registry_list_repositories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_repositories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_repositories", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListRepositories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListRepositoriesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListRepositoriesPager", + "shortName": "list_repositories" + }, + "description": "Sample for ListRepositories", + "file": "artifactregistry_v1_generated_artifact_registry_list_repositories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_repositories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_tags", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListTagsAsyncPager", + "shortName": "list_tags" + }, + "description": "Sample for ListTags", + "file": "artifactregistry_v1_generated_artifact_registry_list_tags_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_tags_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_tags", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListTagsPager", + "shortName": "list_tags" + }, + "description": "Sample for ListTags", + "file": "artifactregistry_v1_generated_artifact_registry_list_tags_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_tags_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.list_versions", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListVersionsAsyncPager", + "shortName": "list_versions" + }, + "description": "Sample for ListVersions", + "file": "artifactregistry_v1_generated_artifact_registry_list_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.list_versions", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.ListVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListVersionsPager", + "shortName": "list_versions" + }, + "description": "Sample for ListVersions", + "file": "artifactregistry_v1_generated_artifact_registry_list_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_list_versions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.set_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "artifactregistry_v1_generated_artifact_registry_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.set_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "artifactregistry_v1_generated_artifact_registry_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "artifactregistry_v1_generated_artifact_registry_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.test_iam_permissions", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "artifactregistry_v1_generated_artifact_registry_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.update_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateProjectSettingsRequest" + }, + { + "name": "project_settings", + "type": "google.cloud.artifactregistry_v1.types.ProjectSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.ProjectSettings", + "shortName": "update_project_settings" + }, + "description": "Sample for UpdateProjectSettings", + "file": "artifactregistry_v1_generated_artifact_registry_update_project_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_project_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.update_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateProjectSettingsRequest" + }, + { + "name": "project_settings", + "type": "google.cloud.artifactregistry_v1.types.ProjectSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.ProjectSettings", + "shortName": "update_project_settings" + }, + "description": "Sample for UpdateProjectSettings", + "file": "artifactregistry_v1_generated_artifact_registry_update_project_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_project_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.update_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateRepositoryRequest" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1.types.Repository" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Repository", + "shortName": "update_repository" + }, + "description": "Sample for UpdateRepository", + "file": "artifactregistry_v1_generated_artifact_registry_update_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.update_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateRepositoryRequest" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1.types.Repository" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Repository", + "shortName": "update_repository" + }, + "description": "Sample for UpdateRepository", + "file": "artifactregistry_v1_generated_artifact_registry_update_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.update_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateTagRequest" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1.types.Tag" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Tag", + "shortName": "update_tag" + }, + "description": "Sample for UpdateTag", + "file": "artifactregistry_v1_generated_artifact_registry_update_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.update_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateTagRequest" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1.types.Tag" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.Tag", + "shortName": "update_tag" + }, + "description": "Sample for UpdateTag", + "file": "artifactregistry_v1_generated_artifact_registry_update_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryAsyncClient.update_vpcsc_config", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateVPCSCConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateVPCSCConfigRequest" + }, + { + "name": "vpcsc_config", + "type": "google.cloud.artifactregistry_v1.types.VPCSCConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.VPCSCConfig", + "shortName": "update_vpcsc_config" + }, + "description": "Sample for UpdateVPCSCConfig", + "file": "artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1.ArtifactRegistryClient.update_vpcsc_config", + "method": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "service": { + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateVPCSCConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1.types.UpdateVPCSCConfigRequest" + }, + { + "name": "vpcsc_config", + "type": "google.cloud.artifactregistry_v1.types.VPCSCConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1.types.VPCSCConfig", + "shortName": "update_vpcsc_config" + }, + "description": "Sample for UpdateVPCSCConfig", + "file": "artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1_generated_artifact_registry_update_vpcsc_config_sync.py" + } + ] +} diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json new file mode 100644 index 000000000000..c22cba2a0008 --- /dev/null +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -0,0 +1,4050 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.devtools.artifactregistry.v1beta2", + "version": "v1beta2" + } + ], + "language": "PYTHON", + "name": "google-cloud-artifact-registry", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.create_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.CreateRepositoryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1beta2.types.Repository" + }, + { + "name": "repository_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_repository" + }, + "description": "Sample for CreateRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_create_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_create_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.create_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.CreateRepositoryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1beta2.types.Repository" + }, + { + "name": "repository_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_repository" + }, + "description": "Sample for CreateRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_create_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_create_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.create_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.CreateTagRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1beta2.types.Tag" + }, + { + "name": "tag_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Tag", + "shortName": "create_tag" + }, + "description": "Sample for CreateTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_create_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_create_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.create_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "CreateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.CreateTagRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1beta2.types.Tag" + }, + { + "name": "tag_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Tag", + "shortName": "create_tag" + }, + "description": "Sample for CreateTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_create_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_create_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.delete_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeletePackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeletePackageRequest" + }, + { + "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_package" + }, + "description": "Sample for DeletePackage", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.delete_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeletePackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeletePackageRequest" + }, + { + "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_package" + }, + "description": "Sample for DeletePackage", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.delete_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteRepositoryRequest" + }, + { + "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_repository" + }, + "description": "Sample for DeleteRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_delete_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.delete_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteRepositoryRequest" + }, + { + "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_repository" + }, + "description": "Sample for DeleteRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_delete_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.delete_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteTagRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_tag" + }, + "description": "Sample for DeleteTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.delete_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteTagRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_tag" + }, + "description": "Sample for DeleteTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.delete_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteVersionRequest" + }, + { + "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_version" + }, + "description": "Sample for DeleteVersion", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.delete_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "DeleteVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.DeleteVersionRequest" + }, + { + "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_version" + }, + "description": "Sample for DeleteVersion", + "file": "artifactregistry_v1beta2_generated_artifact_registry_delete_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_delete_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_file", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetFile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetFileRequest" + }, + { + "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.artifactregistry_v1beta2.types.File", + "shortName": "get_file" + }, + "description": "Sample for GetFile", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_file_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_file_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_file", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetFile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetFileRequest" + }, + { + "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.artifactregistry_v1beta2.types.File", + "shortName": "get_file" + }, + "description": "Sample for GetFile", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_file_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_file_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetPackageRequest" + }, + { + "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.artifactregistry_v1beta2.types.Package", + "shortName": "get_package" + }, + "description": "Sample for GetPackage", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_package_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_package_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_package", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetPackage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetPackageRequest" + }, + { + "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.artifactregistry_v1beta2.types.Package", + "shortName": "get_package" + }, + "description": "Sample for GetPackage", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_package_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_package_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetProjectSettingsRequest" + }, + { + "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.artifactregistry_v1beta2.types.ProjectSettings", + "shortName": "get_project_settings" + }, + "description": "Sample for GetProjectSettings", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_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": "artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetProjectSettingsRequest" + }, + { + "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.artifactregistry_v1beta2.types.ProjectSettings", + "shortName": "get_project_settings" + }, + "description": "Sample for GetProjectSettings", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_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": "artifactregistry_v1beta2_generated_artifact_registry_get_project_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetRepositoryRequest" + }, + { + "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.artifactregistry_v1beta2.types.Repository", + "shortName": "get_repository" + }, + "description": "Sample for GetRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_get_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetRepositoryRequest" + }, + { + "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.artifactregistry_v1beta2.types.Repository", + "shortName": "get_repository" + }, + "description": "Sample for GetRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_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": "artifactregistry_v1beta2_generated_artifact_registry_get_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetTagRequest" + }, + { + "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.artifactregistry_v1beta2.types.Tag", + "shortName": "get_tag" + }, + "description": "Sample for GetTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetTagRequest" + }, + { + "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.artifactregistry_v1beta2.types.Tag", + "shortName": "get_tag" + }, + "description": "Sample for GetTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_tag_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.get_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetVersionRequest" + }, + { + "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.artifactregistry_v1beta2.types.Version", + "shortName": "get_version" + }, + "description": "Sample for GetVersion", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_version_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_version_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.get_version", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "GetVersion" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.GetVersionRequest" + }, + { + "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.artifactregistry_v1beta2.types.Version", + "shortName": "get_version" + }, + "description": "Sample for GetVersion", + "file": "artifactregistry_v1beta2_generated_artifact_registry_get_version_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_get_version_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.import_apt_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportAptArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ImportAptArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_apt_artifacts" + }, + "description": "Sample for ImportAptArtifacts", + "file": "artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.import_apt_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportAptArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ImportAptArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_apt_artifacts" + }, + "description": "Sample for ImportAptArtifacts", + "file": "artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_import_apt_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.import_yum_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportYumArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ImportYumArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_yum_artifacts" + }, + "description": "Sample for ImportYumArtifacts", + "file": "artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.import_yum_artifacts", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ImportYumArtifacts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ImportYumArtifactsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_yum_artifacts" + }, + "description": "Sample for ImportYumArtifacts", + "file": "artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_import_yum_artifacts_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.list_files", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListFiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListFilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListFilesAsyncPager", + "shortName": "list_files" + }, + "description": "Sample for ListFiles", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_files_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_files_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.list_files", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListFiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListFilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListFilesPager", + "shortName": "list_files" + }, + "description": "Sample for ListFiles", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_files_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_files_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.list_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListPackagesAsyncPager", + "shortName": "list_packages" + }, + "description": "Sample for ListPackages", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_packages_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_packages_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.list_packages", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListPackages" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListPackagesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListPackagesPager", + "shortName": "list_packages" + }, + "description": "Sample for ListPackages", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_packages_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_packages_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.list_repositories", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListRepositories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListRepositoriesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListRepositoriesAsyncPager", + "shortName": "list_repositories" + }, + "description": "Sample for ListRepositories", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_repositories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_repositories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.list_repositories", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListRepositories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListRepositoriesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListRepositoriesPager", + "shortName": "list_repositories" + }, + "description": "Sample for ListRepositories", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_repositories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_repositories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.list_tags", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListTagsAsyncPager", + "shortName": "list_tags" + }, + "description": "Sample for ListTags", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_tags_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_tags_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.list_tags", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListTags" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListTagsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListTagsPager", + "shortName": "list_tags" + }, + "description": "Sample for ListTags", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_tags_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_tags_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.list_versions", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListVersionsAsyncPager", + "shortName": "list_versions" + }, + "description": "Sample for ListVersions", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_versions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_versions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.list_versions", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "ListVersions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.ListVersionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListVersionsPager", + "shortName": "list_versions" + }, + "description": "Sample for ListVersions", + "file": "artifactregistry_v1beta2_generated_artifact_registry_list_versions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_list_versions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.set_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.set_iam_policy", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.test_iam_permissions", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.update_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateProjectSettingsRequest" + }, + { + "name": "project_settings", + "type": "google.cloud.artifactregistry_v1beta2.types.ProjectSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.ProjectSettings", + "shortName": "update_project_settings" + }, + "description": "Sample for UpdateProjectSettings", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.update_project_settings", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateProjectSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateProjectSettingsRequest" + }, + { + "name": "project_settings", + "type": "google.cloud.artifactregistry_v1beta2.types.ProjectSettings" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.ProjectSettings", + "shortName": "update_project_settings" + }, + "description": "Sample for UpdateProjectSettings", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_project_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.update_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateRepositoryRequest" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1beta2.types.Repository" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Repository", + "shortName": "update_repository" + }, + "description": "Sample for UpdateRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_repository_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_repository_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.update_repository", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateRepository" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateRepositoryRequest" + }, + { + "name": "repository", + "type": "google.cloud.artifactregistry_v1beta2.types.Repository" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Repository", + "shortName": "update_repository" + }, + "description": "Sample for UpdateRepository", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_repository_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_repository_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient", + "shortName": "ArtifactRegistryAsyncClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryAsyncClient.update_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateTagRequest" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1beta2.types.Tag" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Tag", + "shortName": "update_tag" + }, + "description": "Sample for UpdateTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_tag_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_tag_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient", + "shortName": "ArtifactRegistryClient" + }, + "fullName": "google.cloud.artifactregistry_v1beta2.ArtifactRegistryClient.update_tag", + "method": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", + "service": { + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + "shortName": "ArtifactRegistry" + }, + "shortName": "UpdateTag" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.artifactregistry_v1beta2.types.UpdateTagRequest" + }, + { + "name": "tag", + "type": "google.cloud.artifactregistry_v1beta2.types.Tag" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.artifactregistry_v1beta2.types.Tag", + "shortName": "update_tag" + }, + "description": "Sample for UpdateTag", + "file": "artifactregistry_v1beta2_generated_artifact_registry_update_tag_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "artifactregistry_v1beta2_generated_artifact_registry_update_tag_sync.py" + } + ] +} diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py index 34b11f7d74d8..33cc86b1942f 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py @@ -1197,9 +1197,11 @@ async def test_list_docker_images_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_docker_images(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1887,9 +1889,11 @@ async def test_list_maven_artifacts_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_maven_artifacts(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2591,9 +2595,11 @@ async def test_list_npm_packages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_npm_packages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3273,9 +3279,11 @@ async def test_list_python_packages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_python_packages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4281,9 +4289,11 @@ async def test_list_repositories_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_repositories(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4314,9 +4324,6 @@ def test_get_repository(request_type, transport: str = "grpc"): format_=repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) response = client.get_repository(request) @@ -4847,9 +4854,6 @@ def test_update_repository(request_type, transport: str = "grpc"): format_=gda_repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=gda_repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) response = client.update_repository(request) @@ -5767,9 +5771,11 @@ async def test_list_packages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_packages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6645,9 +6651,11 @@ async def test_list_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7523,9 +7531,11 @@ async def test_list_files_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_files(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8179,9 +8189,11 @@ async def test_list_tags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -13774,9 +13786,6 @@ def test_get_repository_rest(request_type): format_=repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) # Wrap the value into a proper Response obj @@ -14365,9 +14374,6 @@ def test_update_repository_rest(request_type): format_=gda_repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=gda_repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py index 202b7774319f..e549ed865add 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py @@ -1502,9 +1502,11 @@ async def test_list_repositories_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_repositories(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1535,9 +1537,6 @@ def test_get_repository(request_type, transport: str = "grpc"): format_=repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) response = client.get_repository(request) @@ -2068,9 +2067,6 @@ def test_update_repository(request_type, transport: str = "grpc"): format_=gda_repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=gda_repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) response = client.update_repository(request) @@ -2988,9 +2984,11 @@ async def test_list_packages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_packages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3866,9 +3864,11 @@ async def test_list_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4744,9 +4744,11 @@ async def test_list_files_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_files(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5400,9 +5402,11 @@ async def test_list_tags_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tags(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8008,9 +8012,6 @@ def test_get_repository_rest(request_type): format_=repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) # Wrap the value into a proper Response obj @@ -8599,9 +8600,6 @@ def test_update_repository_rest(request_type): format_=gda_repository.Repository.Format.DOCKER, description="description_value", kms_key_name="kms_key_name_value", - maven_config=gda_repository.Repository.MavenRepositoryConfig( - allow_snapshot_overwrites=True - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py index dc24d9a13d3d..30274cc6e9dd 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.4.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py index dc24d9a13d3d..30274cc6e9dd 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.4.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py index daedeac6eb73..6af3e9a38642 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py @@ -2649,7 +2649,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "BareMetalSolutionAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-bare-metal-solution/noxfile.py b/packages/google-cloud-bare-metal-solution/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-bare-metal-solution/noxfile.py +++ b/packages/google-cloud-bare-metal-solution/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py new file mode 100644 index 000000000000..9dc5fb8aef33 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DetachLun +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_DetachLun_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_detach_lun(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.DetachLunRequest( + instance="instance_value", + lun="lun_value", + ) + + # Make the request + operation = client.detach_lun(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_sync.py new file mode 100644 index 000000000000..c60fc3d519a1 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DetachLun +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_detach_lun(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.DetachLunRequest( + instance="instance_value", + lun="lun_value", + ) + + # Make the request + operation = client.detach_lun(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_async.py new file mode 100644 index 000000000000..8f6e9eecf41f --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_get_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_sync.py new file mode 100644 index 000000000000..527fcc636db3 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_get_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_async.py new file mode 100644 index 000000000000..6f7a5aee5ffe --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetLun +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_get_lun(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetLunRequest( + name="name_value", + ) + + # Make the request + response = await client.get_lun(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_sync.py new file mode 100644 index 000000000000..827f66b96f0d --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_lun_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetLun +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_get_lun(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetLunRequest( + name="name_value", + ) + + # Make the request + response = client.get_lun(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_async.py new file mode 100644 index 000000000000..f26a328ac2f1 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNetwork +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_get_network(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetNetworkRequest( + name="name_value", + ) + + # Make the request + response = await client.get_network(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_sync.py new file mode 100644 index 000000000000..07424b68f874 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_network_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNetwork +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_get_network(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetNetworkRequest( + name="name_value", + ) + + # Make the request + response = client.get_network(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_async.py new file mode 100644 index 000000000000..8f2c8025880c --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNfsShare +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_get_nfs_share(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetNfsShareRequest( + name="name_value", + ) + + # Make the request + response = await client.get_nfs_share(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_sync.py new file mode 100644 index 000000000000..6cf680a239bd --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNfsShare +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_get_nfs_share(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetNfsShareRequest( + name="name_value", + ) + + # Make the request + response = client.get_nfs_share(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_async.py new file mode 100644 index 000000000000..30c96142f903 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_get_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetVolumeRequest( + name="name_value", + ) + + # Make the request + response = await client.get_volume(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_sync.py new file mode 100644 index 000000000000..264fb984a80a --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_get_volume_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_get_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.GetVolumeRequest( + name="name_value", + ) + + # Make the request + response = client.get_volume(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_async.py new file mode 100644 index 000000000000..3223995e3b10 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListInstances +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListInstances_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_instances(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_sync.py new file mode 100644 index 000000000000..de4511f3a0db --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_instances_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListInstances +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_instances(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_async.py new file mode 100644 index 000000000000..90cfabb88e03 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListLuns +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListLuns_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_luns(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListLunsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_luns(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_sync.py new file mode 100644 index 000000000000..fc273c9513eb --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_luns_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListLuns +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_luns(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListLunsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_luns(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_async.py new file mode 100644 index 000000000000..9111061f507e --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNetworkUsage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_network_usage(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNetworkUsageRequest( + location="location_value", + ) + + # Make the request + response = await client.list_network_usage(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_sync.py new file mode 100644 index 000000000000..6fd9559c7504 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNetworkUsage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_network_usage(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNetworkUsageRequest( + location="location_value", + ) + + # Make the request + response = client.list_network_usage(request=request) + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_async.py new file mode 100644 index 000000000000..aa88ef3d677d --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNetworks +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_networks(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNetworksRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_networks(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_sync.py new file mode 100644 index 000000000000..d02110d21dbf --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_networks_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNetworks +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_networks(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNetworksRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_networks(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_async.py new file mode 100644 index 000000000000..e0051761b3b5 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNfsShares +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_nfs_shares(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNfsSharesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_nfs_shares(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_sync.py new file mode 100644 index 000000000000..6680b52d3627 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNfsShares +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_nfs_shares(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListNfsSharesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_nfs_shares(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_async.py new file mode 100644 index 000000000000..520718337f05 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVolumes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_list_volumes(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListVolumesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_volumes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_sync.py new file mode 100644 index 000000000000..6ac62485f38f --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_list_volumes_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListVolumes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_list_volumes(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ListVolumesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_volumes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py new file mode 100644 index 000000000000..c8d64fc84991 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_reset_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_sync.py new file mode 100644 index 000000000000..5b1cebecd89c --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_reset_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ResetInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.reset_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py new file mode 100644 index 000000000000..f4b2560405f3 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResizeVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_resize_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ResizeVolumeRequest( + volume="volume_value", + ) + + # Make the request + operation = client.resize_volume(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_sync.py new file mode 100644 index 000000000000..3f7d2b8807fa --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResizeVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_resize_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.ResizeVolumeRequest( + volume="volume_value", + ) + + # Make the request + operation = client.resize_volume(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py new file mode 100644 index 000000000000..d4fe31aa484c --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StartInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_StartInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_start_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_sync.py new file mode 100644 index 000000000000..421a39475b80 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StartInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_start_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.StartInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.start_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py new file mode 100644 index 000000000000..6c6bda2bb849 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StopInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_StopInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_stop_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_sync.py new file mode 100644 index 000000000000..9344bdf68820 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StopInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_stop_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.StopInstanceRequest( + name="name_value", + ) + + # Make the request + operation = client.stop_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py new file mode 100644 index 000000000000..e19678a39bb0 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_update_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateInstanceRequest( + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_sync.py new file mode 100644 index 000000000000..6581b6e6ed51 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_update_instance(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateInstanceRequest( + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py new file mode 100644 index 000000000000..568c3d7f9134 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNetwork +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_update_network(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateNetworkRequest( + ) + + # Make the request + operation = client.update_network(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_sync.py new file mode 100644 index 000000000000..7d4741d51273 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNetwork +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_update_network(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateNetworkRequest( + ) + + # Make the request + operation = client.update_network(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py new file mode 100644 index 000000000000..d806905104e5 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNfsShare +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_update_nfs_share(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateNfsShareRequest( + ) + + # Make the request + operation = client.update_nfs_share(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_sync.py new file mode 100644 index 000000000000..2d5b0857b580 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNfsShare +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_update_nfs_share(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateNfsShareRequest( + ) + + # Make the request + operation = client.update_nfs_share(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py new file mode 100644 index 000000000000..7df9b4821baf --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +async def sample_update_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionAsyncClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateVolumeRequest( + ) + + # Make the request + operation = client.update_volume(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_async] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_sync.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_sync.py new file mode 100644 index 000000000000..19ddf6358d64 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateVolume +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bare-metal-solution + + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bare_metal_solution_v2 + + +def sample_update_volume(): + # Create a client + client = bare_metal_solution_v2.BareMetalSolutionClient() + + # Initialize request argument(s) + request = bare_metal_solution_v2.UpdateVolumeRequest( + ) + + # Make the request + operation = client.update_volume(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json new file mode 100644 index 000000000000..99c48f953bdd --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -0,0 +1,3283 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.baremetalsolution.v2", + "version": "v2" + } + ], + "language": "PYTHON", + "name": "google-cloud-bare-metal-solution", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.detach_lun", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "DetachLun" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.DetachLunRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "lun", + "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": "detach_lun" + }, + "description": "Sample for DetachLun", + "file": "baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.detach_lun", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "DetachLun" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.DetachLunRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "lun", + "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": "detach_lun" + }, + "description": "Sample for DetachLun", + "file": "baremetalsolution_v2_generated_bare_metal_solution_detach_lun_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_detach_lun_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.get_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.get_lun", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetLun" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetLunRequest" + }, + { + "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.bare_metal_solution_v2.types.Lun", + "shortName": "get_lun" + }, + "description": "Sample for GetLun", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_lun_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_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": "baremetalsolution_v2_generated_bare_metal_solution_get_lun_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.get_lun", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetLun" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetLunRequest" + }, + { + "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.bare_metal_solution_v2.types.Lun", + "shortName": "get_lun" + }, + "description": "Sample for GetLun", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_lun_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_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": "baremetalsolution_v2_generated_bare_metal_solution_get_lun_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.get_network", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetNetwork" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetNetworkRequest" + }, + { + "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.bare_metal_solution_v2.types.Network", + "shortName": "get_network" + }, + "description": "Sample for GetNetwork", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_network_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_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": "baremetalsolution_v2_generated_bare_metal_solution_get_network_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.get_network", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetNetwork" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetNetworkRequest" + }, + { + "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.bare_metal_solution_v2.types.Network", + "shortName": "get_network" + }, + "description": "Sample for GetNetwork", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_network_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_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": "baremetalsolution_v2_generated_bare_metal_solution_get_network_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.get_nfs_share", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetNfsShare" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetNfsShareRequest" + }, + { + "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.bare_metal_solution_v2.types.NfsShare", + "shortName": "get_nfs_share" + }, + "description": "Sample for GetNfsShare", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_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": "baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.get_nfs_share", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetNfsShare" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetNfsShareRequest" + }, + { + "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.bare_metal_solution_v2.types.NfsShare", + "shortName": "get_nfs_share" + }, + "description": "Sample for GetNfsShare", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_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": "baremetalsolution_v2_generated_bare_metal_solution_get_nfs_share_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.get_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetVolumeRequest" + }, + { + "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.bare_metal_solution_v2.types.Volume", + "shortName": "get_volume" + }, + "description": "Sample for GetVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_volume_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_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": "baremetalsolution_v2_generated_bare_metal_solution_get_volume_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.get_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "GetVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.GetVolumeRequest" + }, + { + "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.bare_metal_solution_v2.types.Volume", + "shortName": "get_volume" + }, + "description": "Sample for GetVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_get_volume_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_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": "baremetalsolution_v2_generated_bare_metal_solution_get_volume_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_instances", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_luns", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListLuns" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListLunsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListLunsAsyncPager", + "shortName": "list_luns" + }, + "description": "Sample for ListLuns", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_luns_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_luns_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_luns", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListLuns" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListLunsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListLunsPager", + "shortName": "list_luns" + }, + "description": "Sample for ListLuns", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_luns_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_luns_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_network_usage", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNetworkUsage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNetworkUsageRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.types.ListNetworkUsageResponse", + "shortName": "list_network_usage" + }, + "description": "Sample for ListNetworkUsage", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_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": "baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_network_usage", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNetworkUsage" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNetworkUsageRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.types.ListNetworkUsageResponse", + "shortName": "list_network_usage" + }, + "description": "Sample for ListNetworkUsage", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_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": "baremetalsolution_v2_generated_bare_metal_solution_list_network_usage_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_networks", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNetworks" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNetworksRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNetworksAsyncPager", + "shortName": "list_networks" + }, + "description": "Sample for ListNetworks", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_networks_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_networks_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_networks", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNetworks" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNetworksRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNetworksPager", + "shortName": "list_networks" + }, + "description": "Sample for ListNetworks", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_networks_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_networks_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_nfs_shares", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNfsShares" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNfsSharesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNfsSharesAsyncPager", + "shortName": "list_nfs_shares" + }, + "description": "Sample for ListNfsShares", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_nfs_shares", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListNfsShares" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListNfsSharesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNfsSharesPager", + "shortName": "list_nfs_shares" + }, + "description": "Sample for ListNfsShares", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_nfs_shares_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.list_volumes", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListVolumes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListVolumesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumesAsyncPager", + "shortName": "list_volumes" + }, + "description": "Sample for ListVolumes", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_volumes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_volumes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.list_volumes", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ListVolumes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ListVolumesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumesPager", + "shortName": "list_volumes" + }, + "description": "Sample for ListVolumes", + "file": "baremetalsolution_v2_generated_bare_metal_solution_list_volumes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_list_volumes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.reset_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ResetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.reset_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ResetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ResetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reset_instance" + }, + "description": "Sample for ResetInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_reset_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_reset_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.resize_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ResizeVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ResizeVolumeRequest" + }, + { + "name": "volume", + "type": "str" + }, + { + "name": "size_gib", + "type": "int" + }, + { + "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": "resize_volume" + }, + "description": "Sample for ResizeVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_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": "baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.resize_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "ResizeVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.ResizeVolumeRequest" + }, + { + "name": "volume", + "type": "str" + }, + { + "name": "size_gib", + "type": "int" + }, + { + "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": "resize_volume" + }, + "description": "Sample for ResizeVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_resize_volume_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_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": "baremetalsolution_v2_generated_bare_metal_solution_resize_volume_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.start_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.StartInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.start_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "StartInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.StartInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_instance" + }, + "description": "Sample for StartInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_start_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_start_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.stop_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.StopInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.stop_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "StopInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.StopInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "stop_instance" + }, + "description": "Sample for StopInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_stop_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_stop_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.update_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.bare_metal_solution_v2.types.Instance" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.update_instance", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.bare_metal_solution_v2.types.Instance" + }, + { + "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_instance" + }, + "description": "Sample for UpdateInstance", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.update_network", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateNetwork" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateNetworkRequest" + }, + { + "name": "network", + "type": "google.cloud.bare_metal_solution_v2.types.Network" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_network" + }, + "description": "Sample for UpdateNetwork", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.update_network", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateNetwork" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateNetworkRequest" + }, + { + "name": "network", + "type": "google.cloud.bare_metal_solution_v2.types.Network" + }, + { + "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_network" + }, + "description": "Sample for UpdateNetwork", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_network_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_network_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.update_nfs_share", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateNfsShare" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateNfsShareRequest" + }, + { + "name": "nfs_share", + "type": "google.cloud.bare_metal_solution_v2.types.NfsShare" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_nfs_share" + }, + "description": "Sample for UpdateNfsShare", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.update_nfs_share", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateNfsShare" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateNfsShareRequest" + }, + { + "name": "nfs_share", + "type": "google.cloud.bare_metal_solution_v2.types.NfsShare" + }, + { + "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_nfs_share" + }, + "description": "Sample for UpdateNfsShare", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient", + "shortName": "BareMetalSolutionAsyncClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionAsyncClient.update_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateVolumeRequest" + }, + { + "name": "volume", + "type": "google.cloud.bare_metal_solution_v2.types.Volume" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_volume" + }, + "description": "Sample for UpdateVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient", + "shortName": "BareMetalSolutionClient" + }, + "fullName": "google.cloud.bare_metal_solution_v2.BareMetalSolutionClient.update_volume", + "method": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", + "service": { + "fullName": "google.cloud.baremetalsolution.v2.BareMetalSolution", + "shortName": "BareMetalSolution" + }, + "shortName": "UpdateVolume" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bare_metal_solution_v2.types.UpdateVolumeRequest" + }, + { + "name": "volume", + "type": "google.cloud.bare_metal_solution_v2.types.Volume" + }, + { + "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_volume" + }, + "description": "Sample for UpdateVolume", + "file": "baremetalsolution_v2_generated_bare_metal_solution_update_volume_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "baremetalsolution_v2_generated_bare_metal_solution_update_volume_sync.py" + } + ] +} diff --git a/packages/google-cloud-bare-metal-solution/tests/unit/gapic/bare_metal_solution_v2/test_bare_metal_solution.py b/packages/google-cloud-bare-metal-solution/tests/unit/gapic/bare_metal_solution_v2/test_bare_metal_solution.py index b6ff58ab0e14..846bc24b8ed3 100644 --- a/packages/google-cloud-bare-metal-solution/tests/unit/gapic/bare_metal_solution_v2/test_bare_metal_solution.py +++ b/packages/google-cloud-bare-metal-solution/tests/unit/gapic/bare_metal_solution_v2/test_bare_metal_solution.py @@ -1173,9 +1173,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3007,9 +3009,11 @@ async def test_list_volumes_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_volumes(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4181,9 +4185,11 @@ async def test_list_networks_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_networks(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5605,9 +5611,11 @@ async def test_list_luns_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_luns(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6269,9 +6277,11 @@ async def test_list_nfs_shares_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_nfs_shares(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/async_client.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/async_client.py index 3cb058db3a10..a8f0a59d2cd2 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/async_client.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/async_client.py @@ -1656,7 +1656,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AppConnectionsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/transports/rest.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/transports/rest.py index c93b6750ecf6..b0b2bc747e99 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/transports/rest.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/services/app_connections_service/transports/rest.py @@ -1556,7 +1556,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1648,7 +1648,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1717,7 +1717,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-beyondcorp-appconnections/noxfile.py b/packages/google-cloud-beyondcorp-appconnections/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-beyondcorp-appconnections/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnections/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_async.py new file mode 100644 index 000000000000..e2c1208b75b7 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_create_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + app_connection = beyondcorp_appconnections_v1.AppConnection() + app_connection.name = "name_value" + app_connection.type_ = "TCP_PROXY" + app_connection.application_endpoint.host = "host_value" + app_connection.application_endpoint.port = 453 + + request = beyondcorp_appconnections_v1.CreateAppConnectionRequest( + parent="parent_value", + app_connection=app_connection, + ) + + # Make the request + operation = client.create_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_sync.py new file mode 100644 index 000000000000..04b266b2ba85 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_create_app_connection_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_create_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + app_connection = beyondcorp_appconnections_v1.AppConnection() + app_connection.name = "name_value" + app_connection.type_ = "TCP_PROXY" + app_connection.application_endpoint.host = "host_value" + app_connection.application_endpoint.port = 453 + + request = beyondcorp_appconnections_v1.CreateAppConnectionRequest( + parent="parent_value", + app_connection=app_connection, + ) + + # Make the request + operation = client.create_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_async.py new file mode 100644 index 000000000000..31593fd554db --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_delete_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.DeleteAppConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_sync.py new file mode 100644 index 000000000000..1f04274f14fb --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_delete_app_connection_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_delete_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.DeleteAppConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_async.py new file mode 100644 index 000000000000..41307ccd5d77 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_get_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.GetAppConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_app_connection(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_sync.py new file mode 100644 index 000000000000..55231671eddd --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_get_app_connection_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_get_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.GetAppConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_app_connection(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_async.py new file mode 100644 index 000000000000..d329348b944d --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_list_app_connections(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.ListAppConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_sync.py new file mode 100644 index 000000000000..5348ab90b498 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_list_app_connections_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_list_app_connections(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.ListAppConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_async.py new file mode 100644 index 000000000000..01e7c29d5421 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveAppConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_resolve_app_connections(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.ResolveAppConnectionsRequest( + parent="parent_value", + app_connector_id="app_connector_id_value", + ) + + # Make the request + page_result = client.resolve_app_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_sync.py new file mode 100644 index 000000000000..82b125b304ad --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_resolve_app_connections_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveAppConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_resolve_app_connections(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnections_v1.ResolveAppConnectionsRequest( + parent="parent_value", + app_connector_id="app_connector_id_value", + ) + + # Make the request + page_result = client.resolve_app_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_async.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_async.py new file mode 100644 index 000000000000..dc193d3568c3 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +async def sample_update_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient() + + # Initialize request argument(s) + app_connection = beyondcorp_appconnections_v1.AppConnection() + app_connection.name = "name_value" + app_connection.type_ = "TCP_PROXY" + app_connection.application_endpoint.host = "host_value" + app_connection.application_endpoint.port = 453 + + request = beyondcorp_appconnections_v1.UpdateAppConnectionRequest( + app_connection=app_connection, + ) + + # Make the request + operation = client.update_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_async] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_sync.py b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_sync.py new file mode 100644 index 000000000000..f1d223a3a35b --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/beyondcorp_v1_generated_app_connections_service_update_app_connection_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnections + + +# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnections_v1 + + +def sample_update_app_connection(): + # Create a client + client = beyondcorp_appconnections_v1.AppConnectionsServiceClient() + + # Initialize request argument(s) + app_connection = beyondcorp_appconnections_v1.AppConnection() + app_connection.name = "name_value" + app_connection.type_ = "TCP_PROXY" + app_connection.application_endpoint.host = "host_value" + app_connection.application_endpoint.port = 453 + + request = beyondcorp_appconnections_v1.UpdateAppConnectionRequest( + app_connection=app_connection, + ) + + # Make the request + operation = client.update_app_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json new file mode 100644 index 000000000000..a630b6644a7e --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -0,0 +1,1005 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnections.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-beyondcorp-appconnections", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.create_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "CreateAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.CreateAppConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_connection", + "type": "google.cloud.beyondcorp_appconnections_v1.types.AppConnection" + }, + { + "name": "app_connection_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_app_connection" + }, + "description": "Sample for CreateAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_create_app_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_create_app_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.create_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "CreateAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.CreateAppConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_connection", + "type": "google.cloud.beyondcorp_appconnections_v1.types.AppConnection" + }, + { + "name": "app_connection_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_app_connection" + }, + "description": "Sample for CreateAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_create_app_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_create_app_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.delete_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "DeleteAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.DeleteAppConnectionRequest" + }, + { + "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_app_connection" + }, + "description": "Sample for DeleteAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_delete_app_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_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": "beyondcorp_v1_generated_app_connections_service_delete_app_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.delete_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "DeleteAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.DeleteAppConnectionRequest" + }, + { + "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_app_connection" + }, + "description": "Sample for DeleteAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_delete_app_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_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": "beyondcorp_v1_generated_app_connections_service_delete_app_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.get_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "GetAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.GetAppConnectionRequest" + }, + { + "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.beyondcorp_appconnections_v1.types.AppConnection", + "shortName": "get_app_connection" + }, + "description": "Sample for GetAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_get_app_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_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": "beyondcorp_v1_generated_app_connections_service_get_app_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.get_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "GetAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.GetAppConnectionRequest" + }, + { + "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.beyondcorp_appconnections_v1.types.AppConnection", + "shortName": "get_app_connection" + }, + "description": "Sample for GetAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_get_app_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_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": "beyondcorp_v1_generated_app_connections_service_get_app_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.list_app_connections", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "ListAppConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.ListAppConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnections_v1.services.app_connections_service.pagers.ListAppConnectionsAsyncPager", + "shortName": "list_app_connections" + }, + "description": "Sample for ListAppConnections", + "file": "beyondcorp_v1_generated_app_connections_service_list_app_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_list_app_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.list_app_connections", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "ListAppConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.ListAppConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnections_v1.services.app_connections_service.pagers.ListAppConnectionsPager", + "shortName": "list_app_connections" + }, + "description": "Sample for ListAppConnections", + "file": "beyondcorp_v1_generated_app_connections_service_list_app_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_list_app_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.resolve_app_connections", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "ResolveAppConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.ResolveAppConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnections_v1.services.app_connections_service.pagers.ResolveAppConnectionsAsyncPager", + "shortName": "resolve_app_connections" + }, + "description": "Sample for ResolveAppConnections", + "file": "beyondcorp_v1_generated_app_connections_service_resolve_app_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_resolve_app_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.resolve_app_connections", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "ResolveAppConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.ResolveAppConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnections_v1.services.app_connections_service.pagers.ResolveAppConnectionsPager", + "shortName": "resolve_app_connections" + }, + "description": "Sample for ResolveAppConnections", + "file": "beyondcorp_v1_generated_app_connections_service_resolve_app_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_resolve_app_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient", + "shortName": "AppConnectionsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceAsyncClient.update_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "UpdateAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.UpdateAppConnectionRequest" + }, + { + "name": "app_connection", + "type": "google.cloud.beyondcorp_appconnections_v1.types.AppConnection" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_app_connection" + }, + "description": "Sample for UpdateAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_update_app_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_update_app_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient", + "shortName": "AppConnectionsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnections_v1.AppConnectionsServiceClient.update_app_connection", + "method": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", + "service": { + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService", + "shortName": "AppConnectionsService" + }, + "shortName": "UpdateAppConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnections_v1.types.UpdateAppConnectionRequest" + }, + { + "name": "app_connection", + "type": "google.cloud.beyondcorp_appconnections_v1.types.AppConnection" + }, + { + "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_app_connection" + }, + "description": "Sample for UpdateAppConnection", + "file": "beyondcorp_v1_generated_app_connections_service_update_app_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connections_service_update_app_connection_sync.py" + } + ] +} diff --git a/packages/google-cloud-beyondcorp-appconnections/tests/unit/gapic/beyondcorp_appconnections_v1/test_app_connections_service.py b/packages/google-cloud-beyondcorp-appconnections/tests/unit/gapic/beyondcorp_appconnections_v1/test_app_connections_service.py index 540be90685f5..5e9175334cb6 100644 --- a/packages/google-cloud-beyondcorp-appconnections/tests/unit/gapic/beyondcorp_appconnections_v1/test_app_connections_service.py +++ b/packages/google-cloud-beyondcorp-appconnections/tests/unit/gapic/beyondcorp_appconnections_v1/test_app_connections_service.py @@ -1208,9 +1208,11 @@ async def test_list_app_connections_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_app_connections(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2687,9 +2689,11 @@ async def test_resolve_app_connections_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.resolve_app_connections(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py index 78562e444792..05ddede95491 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py @@ -1662,7 +1662,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AppConnectorsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/transports/rest.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/transports/rest.py index 5482e8534e60..7f87908050f9 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/transports/rest.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/transports/rest.py @@ -1556,7 +1556,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1648,7 +1648,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1717,7 +1717,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_async.py new file mode 100644 index 000000000000..d1b4f642030a --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_create_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + app_connector = beyondcorp_appconnectors_v1.AppConnector() + app_connector.name = "name_value" + + request = beyondcorp_appconnectors_v1.CreateAppConnectorRequest( + parent="parent_value", + app_connector=app_connector, + ) + + # Make the request + operation = client.create_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_sync.py new file mode 100644 index 000000000000..8f509183e06f --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_create_app_connector_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_create_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + app_connector = beyondcorp_appconnectors_v1.AppConnector() + app_connector.name = "name_value" + + request = beyondcorp_appconnectors_v1.CreateAppConnectorRequest( + parent="parent_value", + app_connector=app_connector, + ) + + # Make the request + operation = client.create_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_async.py new file mode 100644 index 000000000000..7f07ed9023d0 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_delete_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.DeleteAppConnectorRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_sync.py new file mode 100644 index 000000000000..887c365d72ee --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_delete_app_connector_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_delete_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.DeleteAppConnectorRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_async.py new file mode 100644 index 000000000000..657790525643 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_get_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.GetAppConnectorRequest( + name="name_value", + ) + + # Make the request + response = await client.get_app_connector(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_sync.py new file mode 100644 index 000000000000..c6cd56b851fd --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_get_app_connector_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_get_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.GetAppConnectorRequest( + name="name_value", + ) + + # Make the request + response = client.get_app_connector(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_async.py new file mode 100644 index 000000000000..bb1c566a0c56 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppConnectors +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_list_app_connectors(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.ListAppConnectorsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_connectors(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_sync.py new file mode 100644 index 000000000000..0bca99bd1755 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_list_app_connectors_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppConnectors +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_list_app_connectors(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appconnectors_v1.ListAppConnectorsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_connectors(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_async.py new file mode 100644 index 000000000000..9abb6b40d6a2 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReportStatus +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_ReportStatus_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_report_status(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + resource_info = beyondcorp_appconnectors_v1.ResourceInfo() + resource_info.id = "id_value" + + request = beyondcorp_appconnectors_v1.ReportStatusRequest( + app_connector="app_connector_value", + resource_info=resource_info, + ) + + # Make the request + operation = client.report_status(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_sync.py new file mode 100644 index 000000000000..7a3cf43bbb24 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_report_status_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReportStatus +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_report_status(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + resource_info = beyondcorp_appconnectors_v1.ResourceInfo() + resource_info.id = "id_value" + + request = beyondcorp_appconnectors_v1.ReportStatusRequest( + app_connector="app_connector_value", + resource_info=resource_info, + ) + + # Make the request + operation = client.report_status(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_async.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_async.py new file mode 100644 index 000000000000..7521867c2407 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +async def sample_update_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient() + + # Initialize request argument(s) + app_connector = beyondcorp_appconnectors_v1.AppConnector() + app_connector.name = "name_value" + + request = beyondcorp_appconnectors_v1.UpdateAppConnectorRequest( + app_connector=app_connector, + ) + + # Make the request + operation = client.update_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_async] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_sync.py b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_sync.py new file mode 100644 index 000000000000..2aa744c61375 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/beyondcorp_v1_generated_app_connectors_service_update_app_connector_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppConnector +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appconnectors + + +# [START beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appconnectors_v1 + + +def sample_update_app_connector(): + # Create a client + client = beyondcorp_appconnectors_v1.AppConnectorsServiceClient() + + # Initialize request argument(s) + app_connector = beyondcorp_appconnectors_v1.AppConnector() + app_connector.name = "name_value" + + request = beyondcorp_appconnectors_v1.UpdateAppConnectorRequest( + app_connector=app_connector, + ) + + # Make the request + operation = client.update_app_connector(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json new file mode 100644 index 000000000000..b24a837b4434 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -0,0 +1,1013 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnectors.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-beyondcorp-appconnectors", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.create_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "CreateAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.CreateAppConnectorRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_connector", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.AppConnector" + }, + { + "name": "app_connector_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_app_connector" + }, + "description": "Sample for CreateAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_create_app_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_create_app_connector_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.create_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "CreateAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.CreateAppConnectorRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_connector", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.AppConnector" + }, + { + "name": "app_connector_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_app_connector" + }, + "description": "Sample for CreateAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_create_app_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_create_app_connector_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.delete_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "DeleteAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.DeleteAppConnectorRequest" + }, + { + "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_app_connector" + }, + "description": "Sample for DeleteAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_delete_app_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_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": "beyondcorp_v1_generated_app_connectors_service_delete_app_connector_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.delete_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "DeleteAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.DeleteAppConnectorRequest" + }, + { + "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_app_connector" + }, + "description": "Sample for DeleteAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_delete_app_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_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": "beyondcorp_v1_generated_app_connectors_service_delete_app_connector_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.get_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "GetAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.GetAppConnectorRequest" + }, + { + "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.beyondcorp_appconnectors_v1.types.AppConnector", + "shortName": "get_app_connector" + }, + "description": "Sample for GetAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_get_app_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_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": "beyondcorp_v1_generated_app_connectors_service_get_app_connector_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.get_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "GetAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.GetAppConnectorRequest" + }, + { + "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.beyondcorp_appconnectors_v1.types.AppConnector", + "shortName": "get_app_connector" + }, + "description": "Sample for GetAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_get_app_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_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": "beyondcorp_v1_generated_app_connectors_service_get_app_connector_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.list_app_connectors", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "ListAppConnectors" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ListAppConnectorsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnectors_v1.services.app_connectors_service.pagers.ListAppConnectorsAsyncPager", + "shortName": "list_app_connectors" + }, + "description": "Sample for ListAppConnectors", + "file": "beyondcorp_v1_generated_app_connectors_service_list_app_connectors_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_list_app_connectors_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.list_app_connectors", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "ListAppConnectors" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ListAppConnectorsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appconnectors_v1.services.app_connectors_service.pagers.ListAppConnectorsPager", + "shortName": "list_app_connectors" + }, + "description": "Sample for ListAppConnectors", + "file": "beyondcorp_v1_generated_app_connectors_service_list_app_connectors_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_list_app_connectors_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.report_status", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "ReportStatus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ReportStatusRequest" + }, + { + "name": "app_connector", + "type": "str" + }, + { + "name": "resource_info", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ResourceInfo" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "report_status" + }, + "description": "Sample for ReportStatus", + "file": "beyondcorp_v1_generated_app_connectors_service_report_status_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_report_status_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.report_status", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "ReportStatus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ReportStatusRequest" + }, + { + "name": "app_connector", + "type": "str" + }, + { + "name": "resource_info", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.ResourceInfo" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "report_status" + }, + "description": "Sample for ReportStatus", + "file": "beyondcorp_v1_generated_app_connectors_service_report_status_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_report_status_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient", + "shortName": "AppConnectorsServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceAsyncClient.update_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "UpdateAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.UpdateAppConnectorRequest" + }, + { + "name": "app_connector", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.AppConnector" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_app_connector" + }, + "description": "Sample for UpdateAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_update_app_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_connectors_service_update_app_connector_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient", + "shortName": "AppConnectorsServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appconnectors_v1.AppConnectorsServiceClient.update_app_connector", + "method": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", + "service": { + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService", + "shortName": "AppConnectorsService" + }, + "shortName": "UpdateAppConnector" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.UpdateAppConnectorRequest" + }, + { + "name": "app_connector", + "type": "google.cloud.beyondcorp_appconnectors_v1.types.AppConnector" + }, + { + "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_app_connector" + }, + "description": "Sample for UpdateAppConnector", + "file": "beyondcorp_v1_generated_app_connectors_service_update_app_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_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": "beyondcorp_v1_generated_app_connectors_service_update_app_connector_sync.py" + } + ] +} diff --git a/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py b/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py index c06a8265d346..9a78a71607ef 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py +++ b/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py @@ -1211,9 +1211,11 @@ async def test_list_app_connectors_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_app_connectors(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/async_client.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/async_client.py index 078761e71445..00afee83aa6d 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/async_client.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/async_client.py @@ -1372,7 +1372,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AppGatewaysServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/transports/rest.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/transports/rest.py index 4efeea282dd5..75056257f99a 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/transports/rest.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/services/app_gateways_service/transports/rest.py @@ -1262,7 +1262,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1354,7 +1354,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1423,7 +1423,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-beyondcorp-appgateways/noxfile.py b/packages/google-cloud-beyondcorp-appgateways/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-beyondcorp-appgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-appgateways/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_async.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_async.py new file mode 100644 index 000000000000..0e3f6558b350 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_async.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +async def sample_create_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient() + + # Initialize request argument(s) + app_gateway = beyondcorp_appgateways_v1.AppGateway() + app_gateway.name = "name_value" + app_gateway.type_ = "TCP_PROXY" + app_gateway.host_type = "GCP_REGIONAL_MIG" + + request = beyondcorp_appgateways_v1.CreateAppGatewayRequest( + parent="parent_value", + app_gateway=app_gateway, + ) + + # Make the request + operation = client.create_app_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_async] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_sync.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_sync.py new file mode 100644 index 000000000000..4544af5cfab3 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_create_app_gateway_sync.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +def sample_create_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceClient() + + # Initialize request argument(s) + app_gateway = beyondcorp_appgateways_v1.AppGateway() + app_gateway.name = "name_value" + app_gateway.type_ = "TCP_PROXY" + app_gateway.host_type = "GCP_REGIONAL_MIG" + + request = beyondcorp_appgateways_v1.CreateAppGatewayRequest( + parent="parent_value", + app_gateway=app_gateway, + ) + + # Make the request + operation = client.create_app_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_async.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_async.py new file mode 100644 index 000000000000..032f66212041 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +async def sample_delete_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.DeleteAppGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_async] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_sync.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_sync.py new file mode 100644 index 000000000000..6f576d8220bd --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +def sample_delete_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.DeleteAppGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_app_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_async.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_async.py new file mode 100644 index 000000000000..4bd1ce3d04bf --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +async def sample_get_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.GetAppGatewayRequest( + name="name_value", + ) + + # Make the request + response = await client.get_app_gateway(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_async] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_sync.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_sync.py new file mode 100644 index 000000000000..290be9de5e6f --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_get_app_gateway_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +def sample_get_app_gateway(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.GetAppGatewayRequest( + name="name_value", + ) + + # Make the request + response = client.get_app_gateway(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_async.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_async.py new file mode 100644 index 000000000000..afb850c57e5b --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +async def sample_list_app_gateways(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.ListAppGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_gateways(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_async] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_sync.py b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_sync.py new file mode 100644 index 000000000000..27e60cb4cbd0 --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/beyondcorp_v1_generated_app_gateways_service_list_app_gateways_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-appgateways + + +# [START beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_appgateways_v1 + + +def sample_list_app_gateways(): + # Create a client + client = beyondcorp_appgateways_v1.AppGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_appgateways_v1.ListAppGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_gateways(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json new file mode 100644 index 000000000000..4146eed832ac --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -0,0 +1,675 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.beyondcorp.appgateways.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-beyondcorp-appgateways", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient", + "shortName": "AppGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient.create_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "CreateAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.CreateAppGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_gateway", + "type": "google.cloud.beyondcorp_appgateways_v1.types.AppGateway" + }, + { + "name": "app_gateway_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_app_gateway" + }, + "description": "Sample for CreateAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_create_app_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_async", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_gateways_service_create_app_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient", + "shortName": "AppGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient.create_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "CreateAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.CreateAppGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_gateway", + "type": "google.cloud.beyondcorp_appgateways_v1.types.AppGateway" + }, + { + "name": "app_gateway_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_app_gateway" + }, + "description": "Sample for CreateAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_create_app_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", + "segments": [ + { + "end": 61, + "start": 27, + "type": "FULL" + }, + { + "end": 61, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 51, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 58, + "start": 52, + "type": "REQUEST_EXECUTION" + }, + { + "end": 62, + "start": 59, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_gateways_service_create_app_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient", + "shortName": "AppGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient.delete_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "DeleteAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.DeleteAppGatewayRequest" + }, + { + "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_app_gateway" + }, + "description": "Sample for DeleteAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_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": "beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient", + "shortName": "AppGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient.delete_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "DeleteAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.DeleteAppGatewayRequest" + }, + { + "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_app_gateway" + }, + "description": "Sample for DeleteAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_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": "beyondcorp_v1_generated_app_gateways_service_delete_app_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient", + "shortName": "AppGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient.get_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "GetAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.GetAppGatewayRequest" + }, + { + "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.beyondcorp_appgateways_v1.types.AppGateway", + "shortName": "get_app_gateway" + }, + "description": "Sample for GetAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_get_app_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_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": "beyondcorp_v1_generated_app_gateways_service_get_app_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient", + "shortName": "AppGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient.get_app_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "GetAppGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.GetAppGatewayRequest" + }, + { + "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.beyondcorp_appgateways_v1.types.AppGateway", + "shortName": "get_app_gateway" + }, + "description": "Sample for GetAppGateway", + "file": "beyondcorp_v1_generated_app_gateways_service_get_app_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_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": "beyondcorp_v1_generated_app_gateways_service_get_app_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient", + "shortName": "AppGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceAsyncClient.list_app_gateways", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "ListAppGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.ListAppGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appgateways_v1.services.app_gateways_service.pagers.ListAppGatewaysAsyncPager", + "shortName": "list_app_gateways" + }, + "description": "Sample for ListAppGateways", + "file": "beyondcorp_v1_generated_app_gateways_service_list_app_gateways_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_gateways_service_list_app_gateways_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient", + "shortName": "AppGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_appgateways_v1.AppGatewaysServiceClient.list_app_gateways", + "method": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", + "service": { + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService", + "shortName": "AppGatewaysService" + }, + "shortName": "ListAppGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_appgateways_v1.types.ListAppGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_appgateways_v1.services.app_gateways_service.pagers.ListAppGatewaysPager", + "shortName": "list_app_gateways" + }, + "description": "Sample for ListAppGateways", + "file": "beyondcorp_v1_generated_app_gateways_service_list_app_gateways_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_app_gateways_service_list_app_gateways_sync.py" + } + ] +} diff --git a/packages/google-cloud-beyondcorp-appgateways/tests/unit/gapic/beyondcorp_appgateways_v1/test_app_gateways_service.py b/packages/google-cloud-beyondcorp-appgateways/tests/unit/gapic/beyondcorp_appgateways_v1/test_app_gateways_service.py index af941f6eaed7..8c713210ce60 100644 --- a/packages/google-cloud-beyondcorp-appgateways/tests/unit/gapic/beyondcorp_appgateways_v1/test_app_gateways_service.py +++ b/packages/google-cloud-beyondcorp-appgateways/tests/unit/gapic/beyondcorp_appgateways_v1/test_app_gateways_service.py @@ -1187,9 +1187,11 @@ async def test_list_app_gateways_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_app_gateways(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py index 27a8636015f1..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/async_client.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/async_client.py index 443938ed5b20..50a3b8965a39 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/async_client.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/async_client.py @@ -1555,7 +1555,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ClientConnectorServicesServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/transports/rest.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/transports/rest.py index cdf7c949ecc9..d9b322c2b8bc 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/transports/rest.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/services/client_connector_services_service/transports/rest.py @@ -1446,7 +1446,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1538,7 +1538,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1607,7 +1607,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_async.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_async.py new file mode 100644 index 000000000000..3cd5a535582b --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_async.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +async def sample_create_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient() + + # Initialize request argument(s) + client_connector_service = beyondcorp_clientconnectorservices_v1.ClientConnectorService() + client_connector_service.name = "name_value" + client_connector_service.ingress.config.transport_protocol = "TCP" + client_connector_service.ingress.config.destination_routes.address = "address_value" + client_connector_service.ingress.config.destination_routes.netmask = "netmask_value" + client_connector_service.egress.peered_vpc.network_vpc = "network_vpc_value" + + request = beyondcorp_clientconnectorservices_v1.CreateClientConnectorServiceRequest( + parent="parent_value", + client_connector_service=client_connector_service, + ) + + # Make the request + operation = client.create_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_async] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_sync.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_sync.py new file mode 100644 index 000000000000..4af91684894b --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_sync.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +def sample_create_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient() + + # Initialize request argument(s) + client_connector_service = beyondcorp_clientconnectorservices_v1.ClientConnectorService() + client_connector_service.name = "name_value" + client_connector_service.ingress.config.transport_protocol = "TCP" + client_connector_service.ingress.config.destination_routes.address = "address_value" + client_connector_service.ingress.config.destination_routes.netmask = "netmask_value" + client_connector_service.egress.peered_vpc.network_vpc = "network_vpc_value" + + request = beyondcorp_clientconnectorservices_v1.CreateClientConnectorServiceRequest( + parent="parent_value", + client_connector_service=client_connector_service, + ) + + # Make the request + operation = client.create_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_async.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_async.py new file mode 100644 index 000000000000..aab52d9e1d75 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +async def sample_delete_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.DeleteClientConnectorServiceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_async] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_sync.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_sync.py new file mode 100644 index 000000000000..6b0cf5755613 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +def sample_delete_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.DeleteClientConnectorServiceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_async.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_async.py new file mode 100644 index 000000000000..74613d351b97 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +async def sample_get_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.GetClientConnectorServiceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_client_connector_service(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_async] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_sync.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_sync.py new file mode 100644 index 000000000000..023133440179 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +def sample_get_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.GetClientConnectorServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_client_connector_service(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_async.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_async.py new file mode 100644 index 000000000000..d5b519713b5a --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClientConnectorServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +async def sample_list_client_connector_services(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.ListClientConnectorServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_connector_services(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_async] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_sync.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_sync.py new file mode 100644 index 000000000000..b24bfbd93ebb --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClientConnectorServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +def sample_list_client_connector_services(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientconnectorservices_v1.ListClientConnectorServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_connector_services(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_async.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_async.py new file mode 100644 index 000000000000..22168834d9d4 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_async.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +async def sample_update_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient() + + # Initialize request argument(s) + client_connector_service = beyondcorp_clientconnectorservices_v1.ClientConnectorService() + client_connector_service.name = "name_value" + client_connector_service.ingress.config.transport_protocol = "TCP" + client_connector_service.ingress.config.destination_routes.address = "address_value" + client_connector_service.ingress.config.destination_routes.netmask = "netmask_value" + client_connector_service.egress.peered_vpc.network_vpc = "network_vpc_value" + + request = beyondcorp_clientconnectorservices_v1.UpdateClientConnectorServiceRequest( + client_connector_service=client_connector_service, + ) + + # Make the request + operation = client.update_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_async] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_sync.py b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_sync.py new file mode 100644 index 000000000000..9cdcd4899d67 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_sync.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateClientConnectorService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientconnectorservices + + +# [START beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientconnectorservices_v1 + + +def sample_update_client_connector_service(): + # Create a client + client = beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient() + + # Initialize request argument(s) + client_connector_service = beyondcorp_clientconnectorservices_v1.ClientConnectorService() + client_connector_service.name = "name_value" + client_connector_service.ingress.config.transport_protocol = "TCP" + client_connector_service.ingress.config.destination_routes.address = "address_value" + client_connector_service.ingress.config.destination_routes.netmask = "netmask_value" + client_connector_service.egress.peered_vpc.network_vpc = "network_vpc_value" + + request = beyondcorp_clientconnectorservices_v1.UpdateClientConnectorServiceRequest( + client_connector_service=client_connector_service, + ) + + # Make the request + operation = client.update_client_connector_service(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json new file mode 100644 index 000000000000..9a230827e86d --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -0,0 +1,844 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.beyondcorp.clientconnectorservices.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-beyondcorp-clientconnectorservices", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient", + "shortName": "ClientConnectorServicesServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient.create_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.CreateClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "CreateClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.CreateClientConnectorServiceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_connector_service", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService" + }, + { + "name": "client_connector_service_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_client_connector_service" + }, + "description": "Sample for CreateClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_async", + "segments": [ + { + "end": 63, + "start": 27, + "type": "FULL" + }, + { + "end": 63, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 53, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 60, + "start": 54, + "type": "REQUEST_EXECUTION" + }, + { + "end": 64, + "start": 61, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient", + "shortName": "ClientConnectorServicesServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient.create_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.CreateClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "CreateClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.CreateClientConnectorServiceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_connector_service", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService" + }, + { + "name": "client_connector_service_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_client_connector_service" + }, + "description": "Sample for CreateClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync", + "segments": [ + { + "end": 63, + "start": 27, + "type": "FULL" + }, + { + "end": 63, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 53, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 60, + "start": 54, + "type": "REQUEST_EXECUTION" + }, + { + "end": 64, + "start": 61, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_create_client_connector_service_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient", + "shortName": "ClientConnectorServicesServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient.delete_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.DeleteClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "DeleteClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.DeleteClientConnectorServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_client_connector_service" + }, + "description": "Sample for DeleteClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_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": "beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient", + "shortName": "ClientConnectorServicesServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient.delete_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.DeleteClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "DeleteClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.DeleteClientConnectorServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_client_connector_service" + }, + "description": "Sample for DeleteClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_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": "beyondcorp_v1_generated_client_connector_services_service_delete_client_connector_service_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient", + "shortName": "ClientConnectorServicesServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient.get_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "GetClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.GetClientConnectorServiceRequest" + }, + { + "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.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService", + "shortName": "get_client_connector_service" + }, + "description": "Sample for GetClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_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": "beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient", + "shortName": "ClientConnectorServicesServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient.get_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "GetClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.GetClientConnectorServiceRequest" + }, + { + "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.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService", + "shortName": "get_client_connector_service" + }, + "description": "Sample for GetClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_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": "beyondcorp_v1_generated_client_connector_services_service_get_client_connector_service_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient", + "shortName": "ClientConnectorServicesServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient.list_client_connector_services", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.ListClientConnectorServices", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "ListClientConnectorServices" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ListClientConnectorServicesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_clientconnectorservices_v1.services.client_connector_services_service.pagers.ListClientConnectorServicesAsyncPager", + "shortName": "list_client_connector_services" + }, + "description": "Sample for ListClientConnectorServices", + "file": "beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient", + "shortName": "ClientConnectorServicesServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient.list_client_connector_services", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.ListClientConnectorServices", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "ListClientConnectorServices" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ListClientConnectorServicesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_clientconnectorservices_v1.services.client_connector_services_service.pagers.ListClientConnectorServicesPager", + "shortName": "list_client_connector_services" + }, + "description": "Sample for ListClientConnectorServices", + "file": "beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_list_client_connector_services_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient", + "shortName": "ClientConnectorServicesServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceAsyncClient.update_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.UpdateClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "UpdateClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.UpdateClientConnectorServiceRequest" + }, + { + "name": "client_connector_service", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_client_connector_service" + }, + "description": "Sample for UpdateClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_async", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient", + "shortName": "ClientConnectorServicesServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientconnectorservices_v1.ClientConnectorServicesServiceClient.update_client_connector_service", + "method": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.UpdateClientConnectorService", + "service": { + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService", + "shortName": "ClientConnectorServicesService" + }, + "shortName": "UpdateClientConnectorService" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.UpdateClientConnectorServiceRequest" + }, + { + "name": "client_connector_service", + "type": "google.cloud.beyondcorp_clientconnectorservices_v1.types.ClientConnectorService" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_client_connector_service" + }, + "description": "Sample for UpdateClientConnectorService", + "file": "beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync", + "segments": [ + { + "end": 62, + "start": 27, + "type": "FULL" + }, + { + "end": 62, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 52, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 59, + "start": 53, + "type": "REQUEST_EXECUTION" + }, + { + "end": 63, + "start": 60, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_connector_services_service_update_client_connector_service_sync.py" + } + ] +} diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/tests/unit/gapic/beyondcorp_clientconnectorservices_v1/test_client_connector_services_service.py b/packages/google-cloud-beyondcorp-clientconnectorservices/tests/unit/gapic/beyondcorp_clientconnectorservices_v1/test_client_connector_services_service.py index d490b6fd44d8..0c147ea78363 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/tests/unit/gapic/beyondcorp_clientconnectorservices_v1/test_client_connector_services_service.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/tests/unit/gapic/beyondcorp_clientconnectorservices_v1/test_client_connector_services_service.py @@ -1242,9 +1242,11 @@ async def test_list_client_connector_services_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_client_connector_services(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py index 1f65b1e32568..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py index 1f65b1e32568..30274cc6e9dd 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/async_client.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/async_client.py index 0ea41fecc7a0..4ec474c7414f 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/async_client.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/async_client.py @@ -1350,7 +1350,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ClientGatewaysServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/transports/rest.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/transports/rest.py index ce347de4bc0b..2d166da45b1f 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/transports/rest.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/services/client_gateways_service/transports/rest.py @@ -1261,7 +1261,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1353,7 +1353,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] @@ -1422,7 +1422,7 @@ def __call__( request_kwargs = json_format.MessageToDict(request) transcoded_request = path_template.transcode(http_options, **request_kwargs) - body = json.loads(json.dumps(transcoded_request["body"])) + body = json.dumps(transcoded_request["body"]) uri = transcoded_request["uri"] method = transcoded_request["method"] diff --git a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_async.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_async.py new file mode 100644 index 000000000000..b5adc76499cc --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_async.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +async def sample_create_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient() + + # Initialize request argument(s) + client_gateway = beyondcorp_clientgateways_v1.ClientGateway() + client_gateway.name = "name_value" + + request = beyondcorp_clientgateways_v1.CreateClientGatewayRequest( + parent="parent_value", + client_gateway=client_gateway, + ) + + # Make the request + operation = client.create_client_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_async] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_sync.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_sync.py new file mode 100644 index 000000000000..e9024878bd37 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_create_client_gateway_sync.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +def sample_create_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceClient() + + # Initialize request argument(s) + client_gateway = beyondcorp_clientgateways_v1.ClientGateway() + client_gateway.name = "name_value" + + request = beyondcorp_clientgateways_v1.CreateClientGatewayRequest( + parent="parent_value", + client_gateway=client_gateway, + ) + + # Make the request + operation = client.create_client_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_async.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_async.py new file mode 100644 index 000000000000..9102f96417a4 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +async def sample_delete_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.DeleteClientGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_gateway(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_async] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_sync.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_sync.py new file mode 100644 index 000000000000..2f2dc92c380b --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +def sample_delete_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.DeleteClientGatewayRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_client_gateway(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_async.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_async.py new file mode 100644 index 000000000000..6ae03ea834e3 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +async def sample_get_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.GetClientGatewayRequest( + name="name_value", + ) + + # Make the request + response = await client.get_client_gateway(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_async] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_sync.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_sync.py new file mode 100644 index 000000000000..79fbb46c9472 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_get_client_gateway_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetClientGateway +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +def sample_get_client_gateway(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.GetClientGatewayRequest( + name="name_value", + ) + + # Make the request + response = client.get_client_gateway(request=request) + + # Handle the response + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_async.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_async.py new file mode 100644 index 000000000000..b7cd13506fed --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClientGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +async def sample_list_client_gateways(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.ListClientGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_gateways(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_async] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_sync.py b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_sync.py new file mode 100644 index 000000000000..e49deec41cf7 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/beyondcorp_v1_generated_client_gateways_service_list_client_gateways_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClientGateways +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-beyondcorp-clientgateways + + +# [START beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import beyondcorp_clientgateways_v1 + + +def sample_list_client_gateways(): + # Create a client + client = beyondcorp_clientgateways_v1.ClientGatewaysServiceClient() + + # Initialize request argument(s) + request = beyondcorp_clientgateways_v1.ListClientGatewaysRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_client_gateways(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json new file mode 100644 index 000000000000..6d3ff814a340 --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -0,0 +1,675 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.beyondcorp.clientgateways.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-beyondcorp-clientgateways", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient", + "shortName": "ClientGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient.create_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "CreateClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.CreateClientGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_gateway", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.ClientGateway" + }, + { + "name": "client_gateway_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_client_gateway" + }, + "description": "Sample for CreateClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_create_client_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_gateways_service_create_client_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient", + "shortName": "ClientGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient.create_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "CreateClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.CreateClientGatewayRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "client_gateway", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.ClientGateway" + }, + { + "name": "client_gateway_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_client_gateway" + }, + "description": "Sample for CreateClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_create_client_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_gateways_service_create_client_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient", + "shortName": "ClientGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient.delete_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "DeleteClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.DeleteClientGatewayRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_client_gateway" + }, + "description": "Sample for DeleteClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_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": "beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient", + "shortName": "ClientGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient.delete_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "DeleteClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.DeleteClientGatewayRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_client_gateway" + }, + "description": "Sample for DeleteClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_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": "beyondcorp_v1_generated_client_gateways_service_delete_client_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient", + "shortName": "ClientGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient.get_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "GetClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.GetClientGatewayRequest" + }, + { + "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.beyondcorp_clientgateways_v1.types.ClientGateway", + "shortName": "get_client_gateway" + }, + "description": "Sample for GetClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_get_client_gateway_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_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": "beyondcorp_v1_generated_client_gateways_service_get_client_gateway_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient", + "shortName": "ClientGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient.get_client_gateway", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "GetClientGateway" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.GetClientGatewayRequest" + }, + { + "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.beyondcorp_clientgateways_v1.types.ClientGateway", + "shortName": "get_client_gateway" + }, + "description": "Sample for GetClientGateway", + "file": "beyondcorp_v1_generated_client_gateways_service_get_client_gateway_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_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": "beyondcorp_v1_generated_client_gateways_service_get_client_gateway_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient", + "shortName": "ClientGatewaysServiceAsyncClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceAsyncClient.list_client_gateways", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "ListClientGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.ListClientGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_clientgateways_v1.services.client_gateways_service.pagers.ListClientGatewaysAsyncPager", + "shortName": "list_client_gateways" + }, + "description": "Sample for ListClientGateways", + "file": "beyondcorp_v1_generated_client_gateways_service_list_client_gateways_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_gateways_service_list_client_gateways_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient", + "shortName": "ClientGatewaysServiceClient" + }, + "fullName": "google.cloud.beyondcorp_clientgateways_v1.ClientGatewaysServiceClient.list_client_gateways", + "method": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", + "service": { + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService", + "shortName": "ClientGatewaysService" + }, + "shortName": "ListClientGateways" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.beyondcorp_clientgateways_v1.types.ListClientGatewaysRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.beyondcorp_clientgateways_v1.services.client_gateways_service.pagers.ListClientGatewaysPager", + "shortName": "list_client_gateways" + }, + "description": "Sample for ListClientGateways", + "file": "beyondcorp_v1_generated_client_gateways_service_list_client_gateways_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "beyondcorp_v1_generated_client_gateways_service_list_client_gateways_sync.py" + } + ] +} diff --git a/packages/google-cloud-beyondcorp-clientgateways/tests/unit/gapic/beyondcorp_clientgateways_v1/test_client_gateways_service.py b/packages/google-cloud-beyondcorp-clientgateways/tests/unit/gapic/beyondcorp_clientgateways_v1/test_client_gateways_service.py index 4ccdba8785d7..ef02a5261e1a 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/tests/unit/gapic/beyondcorp_clientgateways_v1/test_client_gateways_service.py +++ b/packages/google-cloud-beyondcorp-clientgateways/tests/unit/gapic/beyondcorp_clientgateways_v1/test_client_gateways_service.py @@ -1207,9 +1207,11 @@ async def test_list_client_gateways_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_client_gateways(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/gapic_version.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/gapic_version.py index 933e30bee98c..30274cc6e9dd 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/gapic_version.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/gapic_version.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/gapic_version.py index 933e30bee98c..30274cc6e9dd 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/async_client.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/async_client.py index 7c7806ca4344..8b2c7c244949 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/async_client.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/async_client.py @@ -1929,7 +1929,7 @@ async def sample_test_iam_permissions(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AnalyticsHubServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-bigquery-analyticshub/noxfile.py b/packages/google-cloud-bigquery-analyticshub/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-bigquery-analyticshub/noxfile.py +++ b/packages/google-cloud-bigquery-analyticshub/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated_samples/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated_samples/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index 100d700c9959..15f781d39e00 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated_samples/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated_samples/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-analyticshub", - "version": "0.4.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py b/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py index f61a930340af..3230e5999607 100644 --- a/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py +++ b/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py @@ -1146,9 +1146,11 @@ async def test_list_data_exchanges_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_data_exchanges(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1589,9 +1591,11 @@ async def test_list_org_data_exchanges_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_org_data_exchanges(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3073,9 +3077,11 @@ async def test_list_listings_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_listings(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3111,9 +3117,6 @@ def test_get_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", - bigquery_dataset=analyticshub.Listing.BigQueryDatasetSource( - dataset="dataset_value" - ), ) response = client.get_listing(request) @@ -3378,9 +3381,6 @@ def test_create_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", - bigquery_dataset=analyticshub.Listing.BigQueryDatasetSource( - dataset="dataset_value" - ), ) response = client.create_listing(request) @@ -3679,9 +3679,6 @@ def test_update_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", - bigquery_dataset=analyticshub.Listing.BigQueryDatasetSource( - dataset="dataset_value" - ), ) response = client.update_listing(request) diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py index 933e30bee98c..30274cc6e9dd 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py index 933e30bee98c..30274cc6e9dd 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/services/metastore_service/async_client.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/services/metastore_service/async_client.py index 1967f4eeda7d..1fd1f96d8770 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/services/metastore_service/async_client.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/services/metastore_service/async_client.py @@ -1909,7 +1909,7 @@ async def sample_list_tables(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "MetastoreServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py index 933e30bee98c..30274cc6e9dd 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.4.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/services/metastore_service/async_client.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/services/metastore_service/async_client.py index 0a89d62ba64e..de6431805684 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/services/metastore_service/async_client.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/services/metastore_service/async_client.py @@ -2332,7 +2332,7 @@ async def sample_list_locks(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "MetastoreServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-bigquery-biglake/noxfile.py b/packages/google-cloud-bigquery-biglake/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-bigquery-biglake/noxfile.py +++ b/packages/google-cloud-bigquery-biglake/noxfile.py @@ -305,10 +305,9 @@ def docfx(session): session.install("-e", ".") session.install( - "sphinx==4.0.1", + "gcp-sphinx-docfx-yaml", "alabaster", "recommonmark", - "gcp-sphinx-docfx-yaml", ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) diff --git a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json index 2b8179b08363..bc293aab30cd 100644 --- a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json +++ b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-biglake", - "version": "0.4.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json index 28d38fee3d32..f43e6ba05775 100644 --- a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json +++ b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-biglake", - "version": "0.4.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1/test_metastore_service.py b/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1/test_metastore_service.py index 70b82fb36aee..4dae4fb14cab 100644 --- a/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1/test_metastore_service.py +++ b/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1/test_metastore_service.py @@ -1853,9 +1853,11 @@ async def test_list_catalogs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_catalogs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1884,9 +1886,6 @@ def test_create_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.create_database(request) @@ -2163,9 +2162,6 @@ def test_delete_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.delete_database(request) @@ -2398,9 +2394,6 @@ def test_update_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.update_database(request) @@ -2667,9 +2660,6 @@ def test_get_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.get_database(request) @@ -3291,9 +3281,11 @@ async def test_list_databases_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_databases(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3323,9 +3315,6 @@ def test_create_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.create_table(request) @@ -3606,9 +3595,6 @@ def test_delete_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.delete_table(request) @@ -3845,9 +3831,6 @@ def test_update_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.update_table(request) @@ -4118,9 +4101,6 @@ def test_rename_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.rename_table(request) @@ -4367,9 +4347,6 @@ def test_get_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.get_table(request) @@ -4994,9 +4971,11 @@ async def test_list_tables_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tables(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6197,9 +6176,6 @@ def test_create_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -6518,9 +6494,6 @@ def test_delete_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -6806,9 +6779,6 @@ def test_update_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -7104,9 +7074,6 @@ def test_get_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -7737,9 +7704,6 @@ def test_create_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -8068,9 +8032,6 @@ def test_delete_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -8364,9 +8325,6 @@ def test_update_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -8670,9 +8628,6 @@ def test_rename_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -8960,9 +8915,6 @@ def test_get_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1alpha1/test_metastore_service.py b/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1alpha1/test_metastore_service.py index ec1294148cd8..0810dc39b3ee 100644 --- a/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1alpha1/test_metastore_service.py +++ b/packages/google-cloud-bigquery-biglake/tests/unit/gapic/bigquery_biglake_v1alpha1/test_metastore_service.py @@ -1853,9 +1853,11 @@ async def test_list_catalogs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_catalogs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1884,9 +1886,6 @@ def test_create_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.create_database(request) @@ -2163,9 +2162,6 @@ def test_delete_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.delete_database(request) @@ -2398,9 +2394,6 @@ def test_update_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.update_database(request) @@ -2667,9 +2660,6 @@ def test_get_database(request_type, transport: str = "grpc"): call.return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) response = client.get_database(request) @@ -3291,9 +3281,11 @@ async def test_list_databases_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_databases(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3323,9 +3315,6 @@ def test_create_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.create_table(request) @@ -3606,9 +3595,6 @@ def test_delete_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.delete_table(request) @@ -3845,9 +3831,6 @@ def test_update_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.update_table(request) @@ -4118,9 +4101,6 @@ def test_rename_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.rename_table(request) @@ -4367,9 +4347,6 @@ def test_get_table(request_type, transport: str = "grpc"): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) response = client.get_table(request) @@ -4994,9 +4971,11 @@ async def test_list_tables_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tables(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6118,9 +6097,11 @@ async def test_list_locks_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_locks(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7325,9 +7306,6 @@ def test_create_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -7646,9 +7624,6 @@ def test_delete_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -7934,9 +7909,6 @@ def test_update_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -8232,9 +8204,6 @@ def test_get_database_rest(request_type): return_value = metastore.Database( name="name_value", type_=metastore.Database.Type.HIVE, - hive_options=metastore.HiveDatabaseOptions( - location_uri="location_uri_value" - ), ) # Wrap the value into a proper Response obj @@ -8865,9 +8834,6 @@ def test_create_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -9196,9 +9162,6 @@ def test_delete_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -9492,9 +9455,6 @@ def test_update_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -9798,9 +9758,6 @@ def test_rename_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj @@ -10088,9 +10045,6 @@ def test_get_table_rest(request_type): name="name_value", type_=metastore.Table.Type.HIVE, etag="etag_value", - hive_options=metastore.HiveTableOptions( - parameters={"key_value": "value_value"} - ), ) # Wrap the value into a proper Response obj